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 -W0 | |
| require "rubygems" | |
| require "garb" | |
| sd = Date.parse("2011-05-01") | |
| ed = Date.parse("2011-05-30") | |
| config = YAML.load(File.open('smt_config.yml')) |
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 -wKU | |
| require "rubygems" | |
| require "nokogiri" | |
| attribs = { | |
| "h3" => "font-size: 16px; font-weight: bold; margin: 0 0 10px; padding: 0 14px;", | |
| "p" => "margin: 0 0 8px; padding: 0 12px;", | |
| "li" => "margin-top:8px;", | |
| "ul" => "margin: 0 0 8px 1.5em; padding: 0 12px;" | |
| } |
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 "rubygems" | |
| require "imgur" | |
| require "appscript" | |
| include Appscript | |
| # get your imgur API key here: http://imgur.com/register/api | |
| imgur_api = "xxxxxxxxxxxxxxxxx" |
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 | |
| # notes at the bottom | |
| require "rubygems" | |
| require "appscript" | |
| require "yaml" | |
| include Appscript | |
| browser = app("Safari") # could be "Google Chrome" or "Firefox," too |
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 "rubygems" | |
| require 'rss/1.0' | |
| require 'rss/2.0' | |
| require 'open-uri' | |
| require 'rss/maker' | |
| version = "2.0" | |
| dest_dir = "" |
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 "rubygems" | |
| require "active_record" | |
| require "uri" | |
| require "yaml" | |
| config_file = File.open(File.expand_path('~') + "/etc/smt_config.yml") | |
| config = YAML.load(config_file) | |
| sites = config["sites"] |
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 "rubygems" | |
| require "roo" | |
| require "ostruct" | |
| require "bitly" | |
| require "yaml" | |
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 -wKU | |
| require "rubygems" | |
| require "appscript" | |
| include Appscript | |
| chrome = app("Google Chrome") | |
| safari = app("Safari") | |
| chrome_tab = chrome.windows[1].active_tab |
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 -wKU | |
| require "rubygems" | |
| require "appscript" | |
| include Appscript | |
| nnw = app("NetNewsWire") | |
| safari = app("Safari") | |
| save_url = nnw.selectedHeadline.URL.get |
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 "appscript" | |
| include Appscript | |
| firefox = app("Firefox") | |
| events = app("System Events") | |
| firefox.activate | |
| events.keystroke("l", :using => [:command_down]) |
OlderNewer