This file contains 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 'json' | |
require 'plist' | |
require 'open-uri' | |
File.open("/Users/aaron/Desktop/tweets.plist", 'w') {|f| JSON.parse(open("http://api.twitter.com/1/statuses/user_timeline.json?screen_name=cocoacontrols").read).to_plist} |
This file contains 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
if RUBY_ENGINE == 'macruby' | |
framework 'CoreServices' | |
WATCHED_EXTS = "rb,builder,erb,nokogiri" | |
PASSENGER_RESTART_FILE = File.expand_path(File.join(File.dirname(__FILE__), "..", "tmp", "restart.txt")) | |
DELAY = 3 | |
def modified_files(path) | |
Dir.glob("#{File.expand_path(path)}/*.{#{WATCHED_EXTS}}").map do |filename| | |
begin |
This file contains 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
framework 'cocoa' | |
class HelloFS | |
PATH = '/hello.txt' | |
def contentsOfDirectoryAtPath(path, error: error) | |
[PATH.lastPathComponent] | |
end | |
def contentsAtPath(path) |
This file contains 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 'net/http' | |
require 'net/https' | |
user = `git config --global github.user`.strip | |
token = `git config --global github.token`.strip | |
raise "Error reading github auth" if user.empty? || token.empty? | |
auth = {:login => user, :token => token} |
NewerOlder