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
- wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz | |
- ./configure --prefix=/usr/local | |
- Download ruby source | |
- ./configure --prefix=/usr/local --disable-install-doc --with-opt-dir=/usr/local/lib/ | |
- sudo apt-get install zlib1g-dev libssl-dev | |
RUBY_SOURCE_DIR/ext/openssl | |
ruby extconf.rb | |
make | |
make install |
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 'oauth2' | |
require 'json' | |
OAuth2::Response.register_parser(:text, 'text/plain') do |body| | |
parsed_body = JSON.parse(body) | |
parsed_body | |
end | |
client = OAuth2::Client.new(YOU_KEY, YOU_SECRET, :site => "https://api.weibo.com", :authorize_url => "/oauth2/authorize", :token_url => "/oauth2/access_token") | |
puts client.auth_code.authorize_url(:redirect_uri => YOUR_CALLBACK_URL) | |
token = client.auth_code.get_token('authorization_code_value', :redirect_uri => YOUR_CALLBACK_URL) |
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
#!/bin/bash | |
pacman -S nginx | |
export JAIL=/srv/http | |
# Create Necessary Devices | |
mkdir $JAIL/dev | |
mknod -m 0666 $JAIL/dev/null c 1 3 | |
mknod -m 0666 $JAIL/dev/random c 1 8 | |
mknod -m 0444 $JAIL/dev/urandom c 1 9 |
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
{ | |
"server": "[email protected]", | |
"server_dir": "/srv/qr.xxx.com", | |
"repo": "[email protected]:fanweixiao/xxxx.git", | |
"branch": "release", | |
"history_releases_count": 3, | |
"shared_dirs": [ | |
"node_modules", | |
"public/bower_components" | |
], |
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
{ "data" : { "all" : [ { "area" : "0", | |
"areaName" : "全国", | |
"key" : "taylor swift", | |
"period" : "20110101|20140311", | |
"ratio" : { "agv_m" : "6064", | |
"agv_w" : "7079", | |
"qoq_m" : "-17", | |
"qoq_w" : "32", | |
"yoy_m" : "-44", | |
"yoy_w" : "-30" |
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
108.160.166.62 dropbox.com | |
108.160.166.62 www.dropbox.com | |
108.160.166.140 client-lb.dropbox.com | |
107.20.134.222 dl.dropbox.com | |
107.20.134.222 dl-web.dropbox.com | |
23.21.206.219 forums.dropbox.com | |
108.160.165.211 notify0.dropbox.com | |
108.160.165.211 notify1.dropbox.com | |
108.160.165.211 notify2.dropbox.com | |
108.160.165.211 notify3.dropbox.com |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Switch Input Source</name> | |
<appendix>Use the right Option key to select the next input source</appendix> | |
<identifier>private.switch_input_source_with_right_option</identifier> | |
<autogen>--KeyToKey-- KeyCode::OPTION_R, KeyCode::SPACE, ModifierFlag::OPTION_L</autogen> | |
</item> | |
<item> |
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 [ `builtin type -p gsed` ]; then | |
gsed -i 's/fonts.googleapis.com/fonts.useso.com/g' templates/head.tmpl | |
gsed -i 's/ajax.googleapis.com/ajax.useso.com/g' templates/head.tmpl | |
gsed -i 's/fonts.googleapis.com/fonts.useso.com/g' static/third_party/flatly/bootstrap.min.css | |
else | |
sed -i 's/fonts.googleapis.com/fonts.useso.com/g' templates/head.tmpl | |
sed -i 's/ajax.googleapis.com/ajax.useso.com/g' templates/head.tmpl | |
sed -i 's/fonts.googleapis.com/fonts.useso.com/g' static/third_party/flatly/bootstrap.min.css | |
fi |
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
var gulp = require('gulp'); | |
var gulpif = require('gulp-if'); | |
var sprite = require('css-sprite').stream; | |
var base = require('gulp-base64'); | |
// generate sprite.png and _sprite.scss | |
gulp.task('sprites', function () { | |
return gulp.src('img/*.png') | |
.pipe(sprite({ | |
name: 'tx.png', |