Skip to content

Instantly share code, notes, and snippets.

View cloverstd's full-sized avatar
🀄
Working for living

cloverstd cloverstd

🀄
Working for living
View GitHub Profile
@cloverstd
cloverstd / gist:2849259
Created June 1, 2012 05:47 — forked from zythum/gist:2848881
google收录的敏感词
@cloverstd
cloverstd / rc,lua
Created July 16, 2012 13:24 — forked from fanzeyi/rc,lua
awesome.config
-- 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
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
class BaseHandler(tornado.web.RequestHandler):
pass
class HandlerMixin(object):
listeners = []
# 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
@cloverstd
cloverstd / app.py
Created November 2, 2013 06:28 — forked from ayang/app.py
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):
[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
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
@cloverstd
cloverstd / aliyun.sources.list
Last active August 31, 2016 05:03 — forked from taichunmin/aliyun.sources.list
阿里云 ubuntu 14.04 镜像
# 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
@cloverstd
cloverstd / surge.conf
Created October 4, 2015 04:04 — forked from janlay/README.md
Yet another config for Surge.app
[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
@cloverstd
cloverstd / 1password.go
Last active August 19, 2016 08:21 — forked from cubarco/simplehttpserver.go
1Password Anywhere go
package main
import (
"flag"
"os/user"
"fmt"
"net/http"
go_path "path"
)