Skip to content

Instantly share code, notes, and snippets.

View hqman's full-sized avatar
🏊‍♂️
Focusing

Kai Wang hqman

🏊‍♂️
Focusing
View GitHub Profile
@hqman
hqman / restart.sh
Created July 18, 2012 02:52
gunicorn_paster starter for pyramid webapp
#!/bin/bash
### BEGIN INIT INFO
#启动 停止 webapp author wangkai hqman@gmail.com
# Short-Description: Start gunicorn_paster.
# Description: Start gunicorn_paster.
### END INIT INFO
PIDFILE=WEBAPP.PID
ENVINI=development.ini
@hqman
hqman / gist:3074740
Created July 9, 2012 07:08 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@hqman
hqman / dabblet.css
Created June 4, 2012 12:40
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@hqman
hqman / dabblet.css
Created June 4, 2012 12:39
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@hqman
hqman / gunicornd
Created March 13, 2012 03:53
manage process gunicorn_paster on ubuntu
#!/bin/bash
### BEGIN INIT INFO
# Provides: manage process gunicorn_paster
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Should-Start: $gunicorn_paster
# Should-Stop: $gunicorn_paster
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start gunicorn_paster.
try:
from recaptcha.client import captcha
from pylons import request, config
class RecaptchaValidator(Schema):
'''
Validates ReCAPTCHA against their web service
'''
@hqman
hqman / gunicorn_lighttpd.conf
Created January 11, 2012 03:03 — forked from thomasbilk/gunicorn_lighttpd.conf
gunicorn lighttpd conf file
server.modules = (
"mod_access",
"mod_alias",
"mod_accesslog",
"mod_extforward",
"mod_rewrite",
#"mod_fastcgi",
"mod_proxy",
"mod_redirect" )