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
王 | |
江 | |
周 | |
胡 | |
刘 | |
李 | |
吴 | |
毛 | |
温 | |
习 |
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
-- Standard awesome library | |
require("awful") | |
require("awful.autofocus") | |
require("awful.rules") | |
-- Theme handling library | |
require("beautiful") | |
-- Notification library | |
require("naughty") | |
naughty.config.default_preset.width = 400 |
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 tornado.httpserver | |
import tornado.ioloop | |
import tornado.options | |
import tornado.web | |
class BaseHandler(tornado.web.RequestHandler): | |
pass | |
class HandlerMixin(object): | |
listeners = [] |
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
# Torndb is a very thin wrapper around MySQLdb that makes it even easier to use MySQL. | |
# Because it is very light, one can just go through the one-file python source | |
# to learn how to use it. | |
# Installation: pip install torndb | |
# Official doc: http://torndb.readthedocs.org/en/latest/ | |
# Source: https://github.com/bdarnell/torndb/blob/master/torndb.py | |
from torndb import Connection |
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
class Application(tornado.web.Application): | |
def __init__(self): | |
tornado.web.Application.__init__(self, handlers, **settings) | |
self.db_session = db_session | |
self.redis = redis.StrictRedis() | |
self.session_store = RedisSessionStore(self.redis) | |
class BaseHandler(tornado.web.RequestHandler): |
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
[unix_http_server] | |
file=/tmp/supervisor.sock ; path to your socket file | |
[supervisord] | |
logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
logfile_backups=10 ; number of backed up logfiles | |
loglevel=error ; info, debug, warn, trace | |
pidfile=/var/run/supervisord.pid ; pidfile location | |
nodaemon=false ; run supervisord as a daemon |
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
worker_processes 2; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} |
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
# deb http://mirrors.aliyun.com/ubuntu trusty main restricted | |
# deb http://mirrors.aliyuncs.com/ubuntu trusty main restricted | |
# deb http://mirrors.aliyun.com/ubuntu trusty-updates main restricted | |
# deb http://mirrors.aliyuncs.com/ubuntu trusty-updates main restricted | |
# deb http://security.ubuntu.com/ubuntu trusty-security main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://mirrors.aliyun.com/ubuntu trusty main restricted |
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
[General] | |
# warning, notify, info, verbose | |
loglevel = notify | |
[Proxy] | |
# http, https, socks5 | |
Proxy = custom, 1.2.3.4, 443, rc4-md5, password, http://server/custom.module | |
[Rule] | |
# Block privacy trackers |
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
package main | |
import ( | |
"flag" | |
"os/user" | |
"fmt" | |
"net/http" | |
go_path "path" | |
) |
OlderNewer