Skip to content

Instantly share code, notes, and snippets.

@haio
haio / gist:4648631
Created January 27, 2013 14:37
linux安装MySQL
$ sudo apt-get install mysql-server mysql-common mysql-client libmysqlclient-dev
@haio
haio / gist:4652081
Created January 28, 2013 01:37
《善恶之尽》(De finibus bonorum et malorum)
Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit…
(中译:无人爱苦,亦无人寻之欲之,乃因其苦…)
{
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme",
"font_size": 16.0,
"ignored_packages":
[
"Vintage"
]
}
------------------------------------------------------------------------------------------------------------------------------
{
@haio
haio / gist:4664820
Created January 29, 2013 14:53
Database Conception
Referential Integraty
OLTP---Online Transaction Processing
OLAP---Online Analytical Processing
@haio
haio / gist:4670140
Created January 30, 2013 02:41
if __FILE__ == $0
if __FILE__ == $0
__FILE__ 是一个魔法值,它存有现在运行的脚本文件的名字。$0 是启动脚本的名字。 代码里的比较结构的意思是 “如果这是启动脚本的话...” 这允许代码作为库调用的时候不运行启动代码, 而在作为执行脚本的时候调用启动代码。
@haio
haio / gist:4673571
Last active December 11, 2015 22:58
RSpec
RSpec
#method_name ####################### instance method
.method_name ####################### class method
expect { something }.to change( something ).by(1/-1)
expect { something }.to change( something ).from(1).to(-1)
@haio
haio / gist:4673897
Created January 30, 2013 15:11
gougou
萨摩耶 哈士奇 金毛寻回 阿拉斯加雪橇
@haio
haio / gist:4705374
Created February 4, 2013 07:08
rails chagte database.yml
#Load exactly database.yml
self.paths['config/database'] = ENV['GAME'].blank? ? "config/database.yml" : "config/database_#{ENV['GAME']}.yml"
|≮止頔︷oo0
插画 http://qing.weibo.com/tag/%E6%8F%92%E7%94%BB