Author Archives: Andrew Hopper

Macbook Pro Hard Drive Replacement

My beloved Macbook keeps running out of space so I keep putting bigger hard drives in it.  The latest is a fabulously large 500GB Hitachi drive. The drive runs quiet and cool. Make sure to buy your new harddrive from Other World Computing. They have a great selection, great shipping policies, and [...]
Posted in Hardware | Tagged | Leave a comment

Postgres Update from function

I always forgot the syntax of the Postgresql update from functionality UPDATE employees SET sales_count = sales_count + 1 FROM accounts WHERE accounts.name = 'Acme Corporation' AND employees.id = accounts.sales_person;
Posted in Postgresql | 6 Comments

Screen keyboard shortcuts

Screen is an amazing little utility that allows you to have multiple sessions going within one terminal session. Here’s a link to the man page - http://man.cx/screen Here’s a quick cheatsheet borrowed from http://www.pixelbeat.org/lkdb/screen.html Key Action Notes Ctrl+a c new window Ctrl+a n next window I bind F12 to this Ctrl+a p previous window I bind F11 to this Ctrl+a “ select window from list I have window list in the status line Ctrl+a [...]
Posted in Linux Admin | Tagged | 4 Comments

Learn VIM in 5 Minutes

I found a great Stack Overflow question on learning VIM here @ http://stackoverflow.com/questions/2573/vim-tutorials VIM 5 Min Tutorial "Here is your 5 minute tutorial. The easiest way to learn vi is to know what the letters stand for:" y(ank) - copy d(elete) - delete c(hange) - change p(aste) - put from buffer after cursor o(pen) - start a new line i(nsert) - insert before current [...]
Posted in Linux Admin | Tagged , | Leave a comment