Recursively Zip a Directory and Files on Linux
It's Short and sweet!
Just remember that the finished zip filename is the first argument and the directory you wish to recursively zip comes after.
zip -r name_of_your_directory.zip name_of_your_directory
That's all.
You might be intere...
Written by Sean Behan on 03/05/2017
Using jQuery and Prototype Javascript Together with jQuery.noConflict();
To use the jQuery javascript framework in a Rails application, that also uses the Prototype framework for the same application, you'll need to reassign the $() function for jQuery to another variable. This is very simple to do. Just make sure to include t...
Written by Sean Behan on 06/17/2012
The survey for people who make websites
I took the survey!
Click here to take it →
Written by Sean Behan on 06/17/2012
Install Rmagick on Ubuntu with MagickWand
apt-get install librmagick-ruby1.8
apt-get install libmagickwand-dev
gem install rmagick
The last command will spit out a bunch of "No definition" comments. There are no rdocs available and this is why.
Written by Sean Behan on 06/17/2012
How To Write Your Own Time Comparison Function in Ruby Like time_ago_in_words Without Rails
# time_ago_in_words(Time.now, 1.day.ago) # => 1 day
# time_ago_in_words(Time.now, 1.hour.ago) # => 1 hour
def time_ago_in_words(t1, t2)
s = t1.to_i - t2.to_i # distance between t1 and t2 in seconds
resolution = if s > 29030400 # seco...
Written by Sean Behan on 10/17/2013