Skip to content

Instantly share code, notes, and snippets.

@jspaper
jspaper / nginx
Created June 24, 2012 03:16
nginx instruction
# install nginx in OSX
brew install nginx
PATH=$PATH:/usr/local/sbin
nginx start
nginx -V # 查看配置文件位置及版本
nginx -c filename # 指定配置文件
nginx -s [reload|reopen|stop|quit]
@jspaper
jspaper / YahooToken.rb
Created May 25, 2012 14:18
yahoo api with oauth-plugin
class YahooToken < ConsumerToken
YAHOO_SETTINGS={
:site => "https://api.login.yahoo.com",
:request_token_path => "/oauth/v2/get_request_token",
:access_token_path => "/oauth/v2/get_token",
:authorize_path=> "/oauth/v2/request_auth"
}
def self.consumer
@jspaper
jspaper / redis-server
Created May 16, 2012 06:14
redis-server init.d script fork from https://github.com/ijonas/dotfiles
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db