Offset an Element with Relative Position Property with CSS Without Taking Up Any Space in the Document
Using CSS positioning it's possible to offset an element and collapse its width and height where it would normally appear. Wrapping the content in an absolute positioned element, the space that the element would normally take up is collapsed.
<div st...
Written by Sean Behan on 06/17/2012
Updating Your Twitter Status with cURL and a Bash Function
I'm usually at the command line so I wrote a little a bash function so that i can type
tweet this is really neat but kind of pointless
and it will update my twitter status! some characters trip it up but in general it's useful for most of my tweets. The...
Written by Sean Behan on 06/17/2012
Simple Activity Stream Implementation in Rails
There are many ways to tackle the Facebook style activity stream feature for your app. The simplest approach, which you can tack on at almost any moment, is what I'll describe here. You don't have to create a new model for news feed items or create any po...
Written by Sean Behan on 06/17/2012
Manage Sinatra Server in Development Mode with Shotgun
Sinatra won't reload your files. So if you're developing your app and want to see any changes made in the browser, install the shotgun gem.
gem install shotgun
You can then use shotgun to run your server
shotgun your_sinatra_ditty.rb
Presto, your ditt...
Written by Sean Behan on 06/17/2012
How to Calculate Age with PHP
Calculate age in PHP
$your_birthday = '1982-08-29';
$difference = date_diff(date_create(), date_create($your_birthday));
$age = $difference->format('%Y');
// 35
Short and sweet
Written by Sean Behan on 11/11/2017