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://www.phabricator.com/rsrc/install/install_ubuntu.sh | |
bash install_ubuntu.sh | |
sudo vim /etc/apache2/sites-enabled/000-default | |
################ | |
<VirtualHost *> | |
# Change this to the domain which points to your host. | |
ServerName codereview.localhost |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="xhrproxy.js"></script> | |
<script> | |
setupXHRProxy(); | |
</script> | |
</head> |
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 python | |
# encoding: utf-8 | |
""" | |
Usage: | |
fab deploy:appname | |
""" | |
from fabric.api import env, run, cd, local, put | |
env.hosts = ['myserver.com'] | |
env.user = 'eric' |
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 | |
# For CentOs 5.7 | |
ln -s /lib/libssl.so.0.9.8e /lib/libssl.so.0.9.8 | |
ln -s /lib64/libssl.so.0.9.8e /lib64/libssl.so.0.9.8 | |
ln -s /lib/libcrypto.so.0.9.8e /lib/libcrypto.so.0.9.8 | |
ln -s /lib64/libcrypto.so.0.9.8e /lib64/libcrypto.so.0.9.8 | |
ln -s /lib/libexpat.so.0 /lib/libexpat.so.1 | |
ln -s /lib64/libexpat.so.0 /lib64/libexpat.so.1 |
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
import urllib2 | |
def xiami_decode(s): | |
s = s.strip() | |
if not s: | |
return False | |
result = [] | |
line = int(s[0]) | |
rows = len(s[1:]) / line | |
extra = len(s[1:]) % line |
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
global | |
log 127.0.0.1 local0 info | |
maxconn 5000 | |
ulimit-n 10000 | |
defaults | |
log global | |
mode http | |
frontend pub-srv 0.0.0.0:8080 |
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
/** | |
* GenPAC 0.2.1 http://jeeker.net/projects/genpac/ | |
* Generated: Fri, 17 May 2013 14:15:55 GMT | |
* GFWList Last-Modified: Fri, 17 May 2013 12:41:31 GMT | |
*/ | |
// proxy | |
var P = "PROXY 192.168.1.1:8118; DIRECT"; | |
// user rules |
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/python | |
# -*- coding: utf-8 -*- | |
import chardet | |
BROTHER_ENCODINGS = [ | |
('GB2312', 'GBK', 'GB18030'), | |
] |
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 python | |
# -*- coding: utf-8 -*- | |
# CUI Downloader of "Command Line Tools for Xcode" | |
# by Akihiro Uchida, CC0 dedicated to the public domain | |
# see http://creativecommons.org/publicdomain/zero/1.0/ | |
import sys, os | |
import urllib, urllib2, cookielib | |
from getpass import getpass | |
from HTMLParser import HTMLParser |
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
import unittest, os, os.path, sys | |
import tornado.database | |
import tornado.options | |
from tornado.options import options | |
APP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) | |
sys.path.append(os.path.join(APP_ROOT, '..')) | |
# import your model module | |
import your.model as model |
OlderNewer