Tuesday, November 5, 2013

Proxy Nodejitsu drone witth nginx

When developing an Angluar application, I needed to make requests to remove servers, and encountered the "Access-Control-Allow-Origin" problem. To overcome this, I decided to proxy the remote server using nginx. Since a remote server was a nodejitsu drone, I needed to modify my nginx configuration a little further than normal: Note the proxy_set_header Host line. This is needed because nodejitsu proxies their drones according to the Host header (docs).

Wednesday, October 30, 2013

Unit testing state transitions with ui-router and karma/jasmine

Testing ui-router state transitions with karma/jasmine is straightforward. The unit test: And karma configuration: Note the html preprocessor and inclusion of the views in the "files" array.

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