- 編輯器設定 soft tab (space=2),以 2 格空白符號做為程式內縮距離(不分語言)。
- 函式如果只有一個參數,就不強制打()
- 函式如果有二個以上的參數,通通都要有 ()
- (避免發生奇怪的paser bug跟保持專案一致性)
- 字串限定用雙引號包覆
- 善用 "#{str1} #{str3} " 等字串改寫技巧取代不需要的字串加法。
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
[user] | |
name = your_name | |
email = your@email.com | |
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
last = log -p -1 | |
[color] |
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
### | |
Module dependencies | |
### | |
require.paths.unshift "#{__dirname}/lib/support/express-csrf/" | |
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/" | |
express = require 'express' | |
app = module.exports = express.createServer() | |
RedisStore = require 'connect-redis' |
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
# coding: UTF-8 | |
# | |
# Yupoo 照片备份工具 | |
# 此工具不需要API,直接就能备份你的照片信息,下载后以图片 + 一个文本文件的方式存放 | |
# 备份包括内容: | |
# 原图,标题,说明,Tag,当然有 Exif 信息 | |
# | |
# Jason Lee <huacnlee@gmail.com> | |
# http://huacnlee.com | |
# 2011-01-28 |
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
theme: advanced | |
theme_advanced_toolbar_location : 'top' | |
theme_advanced_buttons1 : "fontselect, fontsizeselect,|, forecolor, backcolor, bold,italic,underline,strikethrough,|, justifyleft,justifycenter,justifyright,justifyfull,|, bullist,numlist,|, link,unlink,image,|, undo, redo, |, cleanup, code" | |
theme_advanced_buttons2: "" | |
theme_advanced_buttons3: "" | |
theme_advanced_toolbar_align : "left" | |
theme_advanced_statusbar_location: "bottom" | |
theme_advanced_fonts : "宋体=\'宋体\', sans-serif; 黑体=\'黑体\', sans-serif; 楷体=\'楷体_GB2312\', sans-serif; 隶书=\'隶书\', sans-serif;幼圆=\'幼圆\', sans-serif; 新宋体=\'新宋体\',sans-serif;微软雅黑=\'微软雅黑\', sans-serif; Arial=Arial; Arial Black=Arial Black; Arial Narrow=Arial Narrow; Brush Script MT=Brush Script MT; Century Gothic=Century Gothic; Comic Sans MS=Comic Sans MS; Courier=Courier; Courier New=Courier New; MS Sans Serif=MS Sans Serif; Script=Script; System=System; Times New Roman=Times New Roman; Verdana=Verdana; Wide Latin=Wide Latin; Wingdings=Wingdings;" |
- https://gist.github.com/958283
- https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/milestones/71470-31
- http://hemju.com/2011/02/23/rails-3-1-release-rumors-and-news-about-features/
- http://www.hagenburger.net/TALKS/rails-3.1-frontend-performance.html#slide1
Console shows SQL queries right there.
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 --git a/thread_pthread.c b/thread_pthread.c | |
index d3c2609..0ac4f42 100644 | |
--- a/thread_pthread.c | |
+++ b/thread_pthread.c | |
@@ -103,10 +103,23 @@ native_cond_destroy(pthread_cond_t *cond) | |
} | |
} | |
+/* | |
+ * In OS X 10.7 (Lion), pthread_cond_signal and pthread_cond_broadcast return |
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
/* | |
12306 Auto Login => A javascript snippet to help you auto login 12306.com. | |
Copyright (C) 2011 Kevintop | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes 12306.user.js |
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
class App | |
express = require 'express' | |
redis = require 'redis' | |
RedisStore = require('connect-redis')(express) | |
sessionStore = new RedisStore() | |
# These will be used only on ioController() | |
fs = require 'fs' | |
parseCookie = require('connect').utils.parseCookie |
OlderNewer