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
diff -r 9652cdeba438 mako/pyparser.py | |
--- a/mako/pyparser.py Wed May 16 10:38:44 2012 -0400 | |
+++ b/mako/pyparser.py Tue Jun 19 03:44:07 2012 +0800 | |
@@ -66,7 +66,7 @@ | |
def __init__(self, listener, **exception_kwargs): | |
self.in_function = False | |
self.in_assign_targets = False | |
- self.local_ident_stack = {} | |
+ self.local_ident_stack = set() |
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
2012-06-22 15:15:43 [27974] [INFO] Booting worker with pid: 27974 | |
2012-06-22 15:15:43 [27975] [INFO] Booting worker with pid: 27975 | |
2012-06-22 15:15:43 [27868] [INFO] killing worker 27922 with 3 | |
2012-06-22 15:15:43 [27868] [INFO] killing worker File "gunicorn_dev_server.py", line 36, in <module> | |
main() | |
2012-06-22 15:15:43 [27868] [INFO] killing worker File "gunicorn_dev_server.py", line 32, in main | |
ShireApplication("%prog [OPTIONS] APP_MODULE").run() | |
2012-06-22 15:15:43 [27868] [INFO] killing worker File "/home/xieshi/dev/gunicorn/app/base.py", line 129, in run | |
Arbiter(self).run() | |
2012-06-22 15:15:43 [27868] [INFO] killing worker File "/home/xieshi/dev/gunicorn/arbiter.py", line 177, in run |
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
find -mindepth 1 | grep -v '\.svn' | while read d; do svn pl "$d" | grep 'svn:mergeinfo' > /dev/null && echo $d; done |
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
// A simple plugin, convert timestamp to date | |
// [email protected] | |
// 2008-8-8 | |
// Under WTFPL | |
#include "stdafx.h" | |
#include "LaunchyPlugin.h" | |
#include "time.h" | |
#include <sstream> |
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
// ==UserScript== | |
// @name Douban update | |
// @description haha | |
// @author georgexsh | |
// @include http://*.douban.com/* | |
// @version 0.20 | |
// @encoding utf-8 | |
// ==/UserScript== | |
(function () { |
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 re | |
from timeit import timeit | |
def str_replace(s): | |
"""legacy HTML escape for non-unicode mode.""" | |
s = s.replace("&", "&") | |
s = s.replace(">", ">") | |
s = s.replace("<", "<") |
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 sys | |
from gunicorn import util | |
from gunicorn.app.base import Application | |
def make_tb_echo_app(exc): | |
def app(environ, start_response): | |
exc_type, exc_value, exc_info = exc | |
# TODO logging the exception or re-raise | |
return app |
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
commit d264be90f3605f19e903e96e25c8d1d7c15969ca | |
Author: Xie Shi <[email protected]> | |
Date: Mon Jul 14 13:50:38 2014 +0800 | |
convert object w/ an unknown type into string repr | |
ref: https://github.com/getsentry/raven-python/issues/474 | |
diff --git a/raven/utils/json.py b/raven/utils/json.py | |
index 654f019..901e9d2 100644 |
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 os | |
import glob | |
import re | |
all_files = set() | |
for dirpath, dirnames, filenames in os.walk('.'): | |
for f in filenames: | |
dirnames[:] = [d for d in dirnames if not d.startswith('.git')] | |
f = os.path.join(dirpath, f) |
OlderNewer