July 2009
2 posts
wildcard nginx / passenger virtualhosts
Hosting passenger apps on nginx is easy. If they don’t need any specific webserver config, though, it’s even easier. server { listen 80; server_name *.com *.com.au *.net *.org; root /home/$host/current/public; passenger_enabled on; } This is particularly useful in a development environment - just set rails_env development in the server { } block, and ghost the domain to...
Jul 2nd
restarting and refreshing local passenger apps...
Running passenger for development is great, but if you’re hacking code within a plugin then it’s cumbersome to constantly touch tmp/restart.txt and refresh your browser, even if you use tou[UP] to pick the command from your history. Using fish and some applescript, you can do it all from your terminal by hitting ⌥R. function reload_webkit osascript -e 'tell application "WebKit" to...
Jul 1st
February 2009
1 post
This laptop doesn’t seem happy. Exactly once per second it’s alternating between these two separate on-screen artefacts. The half-eaten Control Panel window is a remnant of the real window, which was closed a moment before the photo was taken. Moving the mouse or doing anything else that changes what’s actually on the screen (i.e. in the buffer, sans artefacts) causes them...
Feb 10th
January 2009
1 post
DRM
I think the biggest news out of the Macworld keynote today was the announcement that the iTunes Store is now largely DRM-free, and completely so by March. Steve Jobs wrote thoughts on music almost two years ago, which left quite an impression on me. Many were sceptical of Apple’s intent at the time, but Apple repeatedly put their money where their mouth was—first with EMI, then with...
Jan 7th
December 2008
3 posts
Dec 12th
A common thing I do with git is push my changes to a remote repo, after first updating my project locally with all the changes others have pushed. But I always forget to update first, so the process usually goes— push rap my fingers on the table for five seconds while my laptop talks to github on the other side of the world “oh crap I should have pulled first” pull update...
Dec 1st
A git merge, and hence also the merging stage of a git pull, sets ORIG_HEAD to the commit that HEAD pointed to before the merge. So the commits between these two points are the ones the most recent merge introduced. git log ORIG_HEAD..HEAD \ --pretty=format:"%Cblue%h%Creset %Cgreen%an%Creset %s"
Dec 1st
November 2008
3 posts
Nov 22nd
Nov 3rd
Data we can believe in →
Nov 2nd
October 2008
1 post
Open Letter to Senator the Hon Stephen Conroy,...
Dear Minister, As an Australian and an internet user, I have grave concerns regarding the mandatory internet filter that is currently being deployed in Australia. My concerns are three-fold. The filter will have no effect on the deliberate transfer of illegal content on the Internet. The filter will fail to protect children from illegal and inappropriate content. With the filter in place,...
Oct 16th
September 2008
1 post
I have a pro prompt now, courtesy of @bjeanes and the Internet at large. The current directory is a git repo, and the red word is the current branch. Install SIMBL (I used 0.8.2) and TerminalColours. Tweak the black colour to be dark grey so it’s actually visible, and the overly dark red and blue while you’re at it. Then export your PS1: GIT_PIECE='$(__git_ps1 "...
Sep 14th
August 2008
1 post
rdoc and ri—- Not worth the install time. Get rid of ‘em.
Aug 3rd
July 2008
4 posts
Jul 19th
Been reading up on Haskell. A friend pointed me at a work-in-progress that will eventually be published as an O’Reilly book. It’s incredibly well written and explains the content in a way that is easily approachable, yet accurate. It strikes me as a pretty profound language, as it has such a strict design and is so tightly coupled to pure mathematics. I’m having trouble...
Jul 19th
New design, hopefully to be followed by new content at some point.
Jul 14th
Jul 14th
February 2008
1 post
A Ssheries of Tubes
Just came across this article on my mate Nick’s blog. He speaks the truth—-SSH is brilliant for copying stuff to and fro if you have access to a commandline and the receiving machine is publicly contactable on port 22. To generalise, you can also copy an arbitrary tree of stuff around (including block devices, etc) using tar: tar -zcvf - trinkets/ | ssh you@remote.machine.com 'tar...
Feb 27th