Accessing Links in Nested TD Cells with Prototype
There must be a better way to do the following with PrototypeJS. I want to loop over nested links inside of table td cells and apply a class to the row that the link is in when the link is clicked. If a user clicks on another link the class will be remov...
Written by Sean Behan on 06/17/2012
Rails Migrations and Auto Incrementing Migration Prefix Number
In your environment.rb file turn off timestamped migrations like so:
config.active_record.timestamped_migrations = false
Written by Sean Behan on 06/17/2012
Pickle Python Objects
import pickle
entity = {
"user_id": "1",
"title": "Natural Dog Training",
"link": "http://naturaldogtraining.com",
}
pickled_entity = pickle.dumps(entity)
unpickled_entity = pickle.loads(pickled_entity)
Written by Sean Behan on 06/17/2012
Linux Disk Usage Command Recursive
It's short and sweet!
du -hs *
If you run this command it will tell you the sizes of all the files and folder in the current directory.
The `-h` flag is for human readable format and the `-s` will give you the size for each file or directory.
...
Written by Sean Behan on 03/07/2017
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