Skip to content

Instantly share code, notes, and snippets.

Working for living

cloverstd cloverstd

Working for living
View GitHub Profile
cloverstd / sshpass.rb
Last active Aug 17, 2020 — forked from lalyos/sshpass.rb
brew install sshpass
View sshpass.rb
require 'formula'
class Sshpass < Formula
url ''
homepage ''
sh256 'c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
cloverstd / 1password.go
Last active Aug 19, 2016 — forked from cubarco/simplehttpserver.go
1Password Anywhere go
View 1password.go
package main
import (
go_path "path"
cloverstd / surge.conf
Created Oct 4, 2015 — forked from janlay/
Yet another config for
View surge.conf
# warning, notify, info, verbose
loglevel = notify
# http, https, socks5
Proxy = custom,, 443, rc4-md5, password, http://server/custom.module
# Block privacy trackers
cloverstd / aliyun.sources.list
Last active Aug 31, 2016 — forked from taichunmin/aliyun.sources.list
阿里云 ubuntu 14.04 镜像
View aliyun.sources.list
# deb trusty main restricted
# deb trusty main restricted
# deb trusty-updates main restricted
# deb trusty-updates main restricted
# deb trusty-security main restricted
# See for how to upgrade to
# newer versions of the distribution.
deb trusty main restricted
View tornado-nginx-example.conf
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/;
events {
worker_connections 1024;
use epoll;
View supervisord-example.conf
file=/tmp/supervisor.sock ; path to your socket file
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/ ; pidfile location
nodaemon=false ; run supervisord as a daemon
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):
# 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:
# Source:
from torndb import Connection
View gist:6558027
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
class BaseHandler(tornado.web.RequestHandler):
class HandlerMixin(object):
listeners = []
cloverstd / rc,lua
Created Jul 16, 2012 — forked from fanzeyi/rc,lua
View rc,lua
-- Standard awesome library
-- Theme handling library
-- Notification library
naughty.config.default_preset.width = 400
You can’t perform that action at this time.