This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bang | |
raise | |
ensure | |
return | |
end | |
bang | |
puts "you wouldn't expect to get here" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'active_record' | |
class Salutations | |
attr_accessor :greeting, :farewell | |
def initialize(greeting, farewell) | |
@greeting = greeting | |
@farewell = farewell | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'osx/cocoa' | |
include OSX | |
OSX.require_framework 'ScriptingBridge' | |
itunes = SBApplication.applicationWithBundleIdentifier( 'com.apple.itunes' ) | |
itunes_window = itunes.windows.first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'cgi' | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
class SXSWPodcast | |
attr_reader :title, :description, :date, :link | |
NewerOlder