Vim Tips and Tricks
The following tips and tricks can be put into your .vimrc file
Remap jj to esc
imap jj <Esc>
Quickly leave edit mode and back to visual mode with jj. This is probably the fastest key combination possible and one of the most frequent key combinatio...
Written by Sean Behan on 06/17/2012
Starting the Rails Console in Production Mode
To specify which mode you'd like the rails console to boot up in, just provide the string without any flags.
./script/console production
./script/console test
./script/console development
If you're on windows, remember the backslash "\" rather than for...
Written by Sean Behan on 06/17/2012
Testing current_user and Sessions with Sinatra and Rack Test
Assume you have your standard Sinatra application.
# app.rb
require 'sinatra'
configure do
enable :sessions
end
get '/' do
if session[:user_id]
"OK"
else
raise "NOT OK!"
end
end
To test this you need to make a re...
Written by Sean Behan on 08/22/2013
When the cloud is a good idea
A buddy of mine is a talented, but paranoid System Administrator for a small web company. He refuses to see the truth and the beauty in the wonderful world made possible by cloud computing services like Amazon's EC2. Amazon is not the only game in town. T...
Written by Sean Behan on 06/17/2012
Me in 3D
My friend Andy made this 3D rendering of me using LIDAR (Laser Detection and Ranging). In the first image you can see me holding up my hand along with a number of file cabinets. The cube in the center is a table used to calibrate the device.
In this sh...
Written by Sean Behan on 06/17/2012