Skip to content

Instantly share code, notes, and snippets.

View shenzhaoyan's full-sized avatar
🙂

Charles Shen shenzhaoyan

🙂
View GitHub Profile
@shenzhaoyan
shenzhaoyan / gist:2168156
Created March 23, 2012 08:03 — forked from msabramo/gist:1409594
brew install growlnotify-1.2.2 on OS X 10.6 (Snow Leopard)
marca@SCML-MarcA:/usr/local$ growlnotify
dyld: Symbol not found: _kSecRandomDefault
Referenced from: /usr/local/bin/growlnotify
Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security
in /usr/local/bin/growlnotify
Trace/BPT trap
marca@SCML-MarcA:/usr/local$ brew versions growlnotify
1.3 git checkout 2e23ced Library/Formula/growlnotify.rb
1.2.2 git checkout 5fb24f5 Library/Formula/growlnotify.rb
@shenzhaoyan
shenzhaoyan / gist:1085935
Created July 16, 2011 02:44 — forked from mwawrusch/gist:1042106
twitter config
Twitter.configure do |config|
# config.gateway = "http://#{self.apigee_twitter_api_endpoint}"
config.consumer_key = self.twitter_key
config.consumer_secret= self.twitter_secret
config.oauth_token = authentication.token
config.oauth_token_secret = authentication.secret
end
user.set_is_working! true, 1,"Retrieving followers and friends!",false
@shenzhaoyan
shenzhaoyan / sample.rb
Created January 7, 2011 02:58 — forked from mtodd/sample.rb
Sinatra helpers
helpers do
def format
(params[:format] || :json).to_sym
end
def render_to(format, results)
case format
when :json
results.to_json
when :xml