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
db/*.sqlite3 | |
#db/schema.rb | |
log/*.log | |
tmp/**/* | |
*.swp # Vim | |
*.tmproj # TextMate | |
tmtags # TextMate | |
.DS_Store # Mac OS X |
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
@-moz-document url-prefix() { | |
#search .button_cell input { | |
height:27px; | |
padding-bottom:2px; | |
} | |
} |
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 . -name "*@*" | xargs -I % svn add %@ |
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
1,使用Tab,不使用Space。Tab的宽度自由决定,默认为8个space的宽度。 | |
2,所有的程序注解使用英文,不出现中文。 | |
3,所有文件和文件夹的命名使用小写,使用名词。文件命名尽量使用一个单词;如果必须使用多个单词,单词间用_连接。文件夹命名必须使用一个单词。 | |
4,公共类库高于私有类库。(例如,JavaScript编程必须基于jQuery,基础类不继承自私有类库。) | |
5,通用编程模式高于私有编程模式。(例如:RESTful架构、MVC模式高于个人创立的模式) | |
6,标准文件和数据格式高于私有文件和数据格式。(例如:JSON高于自定义的文本格式) | |
7,任何情况下,简单高于复杂。 | |
8,通常情况下,结构高于效率。 |
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
function hover_line() { | |
$('#left li').mouseenter(function() { | |
$(this).addClass("hovered"); | |
}).mouseleave(function() { | |
$(this).removeClass("hovered"); | |
}); | |
} |
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
.oval { | |
border-radius: 20px; // Half of a square image's height. | |
} |
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
安装Homebrew(http://mxcl.github.com/homebrew/)。安装之前需要卸掉macports和fink之类的package management systems。 | |
[3/29/12 12:16:31 PM] 王益: 安装方式很简单。一行命令: | |
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" |
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
package main | |
import "net/http" | |
func main() { | |
panic(http.ListenAndServe(":8080", http.FileServer(http.Dir("/File/Folder/Path")))) | |
} |
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
"Having Vim in nocompatible mode, opens a lot of features | |
:set nocompatible | |
" Encoding | |
set fileencodings=utf-8 | |
" Font | |
:set guifont=Menlo\ 11 | |
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
app.plateSections = function() { | |
var plateWidth = 0; | |
// Add the first section's width. | |
goog.style.getSize( goog.dom.getFirstElementChild( goog.dom.getElement('plate') ) ).width ; | |
// Position each of the sections horizontally one after another starting from the first child of plate. | |
goog.array.forEach( goog.dom.getChildren( goog.dom.getElement('plate') ), function(section) { | |
goog.style.setPosition( goog.dom.getNextElementSibling(section), goog.style.getPosition(section).x + goog.style.getSize(section).width ); | |
// Accumulate the width of each section after the first section. | |
plateWidth += goog.style.getSize(section).width; |
OlderNewer