Skip to content

Instantly share code, notes, and snippets.

View sebastiangeiger's full-sized avatar
🐕

Sebastian Geiger sebastiangeiger

🐕
View GitHub Profile
ruby -e "require 'time';puts ((Time.parse('Jun 11 11:50') - Time.now) / 60 / 60 / 24).round.to_s + ' days left'"
brad@brad-laptop:~ $ macirb
irb(main):001:0> framework 'Cocoa'
=> true
irb(main):002:0> app = NSApplication.sharedApplication
=> #<NSApplication:0x8003a8500>
irb(main):003:0> status_bar = NSStatusBar.systemStatusBar
=> #<NSSystemStatusBar:0x8003b8ec0>
irb(main):004:0> item = status_bar.statusItemWithLength(NSVariableStatusItemLength)
=> #<NSStatusItem:0x8003b7c00>
irb(main):005:0> item.title = "Hello MacRuby!"
require 'sinatra'
require 'dm-core'
require 'dm-migrations'
require 'haml'
DataMapper.setup(:default, 'sqlite3::memory:')
class Message
include DataMapper::Resource