Skip to content

Instantly share code, notes, and snippets.

View matsadler's full-sized avatar

Mat Sadler matsadler

View GitHub Profile
# http://dnssd.rubyforge.org/dnssd/
# http://xmpp.org/extensions/xep-0174.html
# http://home.gna.org/xmpp4r/
require 'rubygems'
require 'dnssd'
require 'xmpp4r'
# An example of how to send messages to iChat with the bonjour chat protocol
# using ruby.
def bang
raise
ensure
return
end
bang
puts "you wouldn't expect to get here"
require 'rubygems'
require 'active_record'
class Salutations
attr_accessor :greeting, :farewell
def initialize(greeting, farewell)
@greeting = greeting
@farewell = farewell
end
#!/usr/bin/env ruby
require 'osx/cocoa'
include OSX
OSX.require_framework 'ScriptingBridge'
itunes = SBApplication.applicationWithBundleIdentifier( 'com.apple.itunes' )
itunes_window = itunes.windows.first
#!/usr/bin/env ruby
require 'cgi'
require 'rubygems'
require 'hpricot'
require 'open-uri'
class SXSWPodcast
attr_reader :title, :description, :date, :link