This file contains hidden or 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
|≮止頔︷oo0 |
This file contains hidden or 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
#Load exactly database.yml | |
self.paths['config/database'] = ENV['GAME'].blank? ? "config/database.yml" : "config/database_#{ENV['GAME']}.yml" |
This file contains hidden or 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
萨摩耶 哈士奇 金毛寻回 阿拉斯加雪橇 |
This file contains hidden or 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
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) |
This file contains hidden or 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
if __FILE__ == $0 | |
__FILE__ 是一个魔法值,它存有现在运行的脚本文件的名字。$0 是启动脚本的名字。 代码里的比较结构的意思是 “如果这是启动脚本的话...” 这允许代码作为库调用的时候不运行启动代码, 而在作为执行脚本的时候调用启动代码。 |
This file contains hidden or 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
Referential Integraty | |
OLTP---Online Transaction Processing | |
OLAP---Online Analytical Processing |
This file contains hidden or 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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme", | |
"font_size": 16.0, | |
"ignored_packages": | |
[ | |
"Vintage" | |
] | |
} | |
------------------------------------------------------------------------------------------------------------------------------ | |
{ |
This file contains hidden or 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
Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit… | |
(中译:无人爱苦,亦无人寻之欲之,乃因其苦…) |
This file contains hidden or 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
$ sudo apt-get install mysql-server mysql-common mysql-client libmysqlclient-dev |
This file contains hidden or 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
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'rootpasswd' WITH MAX_CONNECTIONS_PER_HOUR 5; | |
GRANT ALL PRIVILEGES ON *.* TO 'username'@'1.1.0.123' IDENTIFIED BY 'rootpasswd' MAX_CONNECTIONS_PER_HOUR 5; | |
GRANT SELECT ON dbname.* to 'username'@'%' IDENTIFIED BY by 'iamwangnc'; | |
FLUSH PRIVILEGES; | |
select * from mysql.user; | |
REVOKE ALL PRIVILEGES ON *.* TO 'root'@'%'; | |
delete from mysql.user where Host='%'; | |
FLUSH PRIVILEGES; |