Postlearn Job Board
Postlearn is a job board focused on delivering quality jobs listings to people in education.
An affiliate program is available to bloggers and site owners in the edu space. Bloggers who participate receive a percentage of referrer sales. A widget display...
Written by Sean Behan on 06/17/2012
Using Prototype to Access Form Data
Prototype has a powerful API for accessing and manipulating the Document Object Model, A.K.A the DOM. The following code will let you interact with a simple web form.
Suppose we have a form that contains hidden/or locked inputs and they need to be update...
Written by Sean Behan on 06/17/2012
Using Grep To Find or Match All Links in an HTML Document
egrep -or "(http(s)?://){1}[^'\"]+" path/to/directory
You can further reduce to just return the images by piping again.
grep -r src views/ | egrep -o "(mailto|ftp|http(s)?://){1}[^'\"]+"
The -r flag is for a recursive directory scan....
Written by Sean Behan on 09/15/2013
Rake DB Everything, Dump, Destroy, Create, Load
I'm a big fan of the yaml_db plugin. But I don't like running rake db:data:load, only to find that my db columns mismatch my model attributes, thus aborting the data import task. To quickly add/remove columns/attributes from a model and rebuild the datab...
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