Skip to content

Instantly share code, notes, and snippets.

require 'rubygems'
require 'hirb'
Hirb::View.enable
if rails_env = ENV['RAILS_ENV']
rails_root = File.basename(Dir.pwd)
IRB.conf[:PROMPT] ||= {}
IRB.conf[:PROMPT][:RAILS] = {
:PROMPT_I => "#{rails_root}> ",
:PROMPT_S => "#{rails_root}* ",
namespace :deploy do
PRODUCTION_APP = 'myapp'
STAGING_APP = 'myapp-staging'
def run(*cmd)
system(*cmd)
raise "Command #{cmd.inspect} failed!" unless $?.success?
end
def confirm(message)
@dogeth
dogeth / oneline_format.rb
Created October 31, 2009 06:21
Format a calander as one line per day/event
#Script to change the TSCQ calander into a one line format
require 'rubygems'
require 'icalendar'
require 'active_support'
include Icalendar
timezone_offset = 10
@dogeth
dogeth / brisbane_tides.rb
Created October 22, 2009 09:29
Pull tide information from bom.gov.au and output in ical format
#Script to pull tide information from bom and output in ical format
require 'rubygems'
require 'rest_client'
require 'hpricot'
require 'icalendar'
include Icalendar
def isNumeric(s)