I wanted a visual notification in Ubuntu when long running commands finished in Terminal. My solution, run the command and pipe it into notify. $ a-long-running-command | notify notify.rb Make it executable add an alias to it in ~/.bashrc Requires: ruby, rubygems, and libnotify. Similar solutions: “alert” alias (I’ll be switching to this in Maverick), […]
Category Archives: ruby
Download ruby duration lib Duration.new recieves a string describing a duration of time, and converts it into: seconds, and a standard readable format. Or, you can pass Duration.new an integer representing seconds, and receive the same standard readable format. Usage: Passing a String Passing an Fixnum (of seconds) Example valid input strings: “2 weeks”, […]
I had a csv like this: object color flavor shape apple red sweet round banana yellow sweet long lemon yellow sour round and I wanted a ruby hash structured like this: So I wrote this, which does the job:
This is a ruby module useful for conversions dealing with length, weight, torque.