This file contains hidden or 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=utf8 | |
| import sys | |
| from utils import col_decorate, BaseError | |
| class InputError(BaseError): | |
| pass | |
This file contains hidden or 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
| [alias] | |
| ci = commit | |
| cim = commit -m | |
| st = status | |
| aa = add -A | |
| lg = log --graph --pretty=oneline --abbrev-commit --decorate | |
| last3 = log -3 | |
| [core] | |
| editor = vim |
This file contains hidden or 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
| [client] | |
| default-character-set=utf8 | |
| [mysqld] | |
| default-character-set=utf8 | |
| init_connect='SET NAMES utf8' | |
| [mysql] | |
| default-character-set=utf8 |
This file contains hidden or 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 | |
| import socket,select | |
| # -*- coding: utf-8 -*- | |
| import sys, os, time, atexit | |
| from signal import SIGTERM | |
| class Daemon: | |
| """ | |
| A generic daemon class. | |
| Usage: subclass the Daemon class and override the _run() method |
This file contains hidden or 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=utf8 | |
| def directSelectSort(seq, mode='b-s'): | |
| """ | |
| :b-s :: big -> small | |
| :s-b :: small -> big | |
| """ | |
| size = len(seq) | |
| for i in range(0, size - 1): |
This file contains hidden or 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 hidden or 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 | |
| """DoubanServiceBench""" | |
| __author__ = "Qiangning Hong <[email protected]>" | |
| __version__ = "$Revision: 51434 $" | |
| __date__ = "$Date: 2010-11-17 17:44:38 +0800 (Wed, 17 Nov 2010) $" | |
| import sys |
This file contains hidden or 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 | |
| watchmedo shell-command --patterns="*.less" --command=\ | |
| 'LESS=`echo "${watch_src_path}" | sed s/.less/.css/`; \ | |
| echo compile: "${watch_src_path}";\ | |
| lessc "${watch_src_path}" "${LESS}"; \ | |
| if [ "$?" -eq "0" ]; then echo wrote: "${LESS}"; fi' $* |
This file contains hidden or 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
| /* | |
| SublimeLinter default settings | |
| */ | |
| { | |
| /* | |
| Sets the mode in which SublimeLinter runs: | |
| true - Linting occurs in the background as you type (the default). | |
| false - Linting only occurs when you initiate it. | |
| "load-save" - Linting occurs only when a file is loaded and saved. |
This file contains hidden or 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'), | |
| ] |