Thursday, April 11, 2013

Extended desktop using XFCE

In the XFCE display settings manager, if you see your screen but instead of extending the desktop it clones the desktop on both displays.




To enable this. use xrandr
You should see something like this

LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 310mm x 174mm

blahblah

HDMI1 connected 1280x720+1366+0 (normal left inverted right x axis y axis) 16mm x 9mm

To extend the desktop and use the HDMI connected monitor on the right side, do this:
➜  ~  xrandr --output HDMI1 --right-of LVDS1



Wednesday, October 10, 2012

Use Meld as a diff tool for git

To view git diff through meld, my favorite diff viewing tool, do the following:

  1. Write a small script in ~/bin/gitdiff, or wherever you like to store your scripts
    #!/bin/bash
    meld $2 $5


  2. git config --global diff.external ~/bin/gitdiff
Done!

RESTful API development using Node

Below are some helpful things I've come across while developing a RESTful API for a project of mine. I'll be updating this as I go.
  • REST-esting using curl -- a guide to using curl for testing RESTful API's
  • Postman Chrome Extension. Much better than using curl, in my opinion. 
  • Apigee is a web service meant to serve as a middleman between your server and clients. Useful for things like rate limiting, limited JSON->XML conversion, and even load balancing.