Skip to content

Instantly share code, notes, and snippets.

View kejinlu's full-sized avatar
💭
I may be slow to respond.

Luke kejinlu

💭
I may be slow to respond.
View GitHub Profile
@kejinlu
kejinlu / gitverify.py
Created May 14, 2013 04:40
Verify git object with python!
#!/usr/bin/python
# -*- coding: utf-8 -*-
import zlib,os,sys,hashlib
reload(sys)
sys.setdefaultencoding('utf8')
if len(sys.argv) < 2:
print "Need the path of git object!"
exit()
@kejinlu
kejinlu / gist:2212718
Created March 27, 2012 05:17
dumpInfo For Objc Class
//你得 #import <objc/runtime.h>
-(void)dumpInfoForClass:(Class)clazz
{
u_int count;
Ivar* ivars = class_copyIvarList(clazz, &count);
NSMutableArray* ivarArray = [NSMutableArray arrayWithCapacity:count];
for (int i = 0; i < count ; i++)
{
const char* ivarName = ivar_getName(ivars[i]);
@kejinlu
kejinlu / April.dvtcolortheme
Created June 20, 2011 09:27
Xcode4 April Theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0 0 0 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0 0 0 1</string>
@kejinlu
kejinlu / fastcgi_params
Created May 24, 2011 09:05
fastcgi_params
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
@kejinlu
kejinlu / vanilla_nginx.conf
Created May 24, 2011 09:04
Vanilla的nginx配置
server {
listen 80;
server_name v.geeklu.com;
server_name_in_redirect off;
root /var/www/vanilla;
index index.php index.html;
location / {
if (-f $request_filename) {
break;