Skip to content

Instantly share code, notes, and snippets.

@haio
haio / gist:5018645
Created February 23, 2013 06:06
use bigint in mytsql with rails
http://moeffju.net/blog/using-bigint-columns-in-rails-migrations
@haio
haio / gist:5053501
Created February 28, 2013 01:43
Motto
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
@haio
haio / gist:5064870
Created March 1, 2013 14:05
Good Design
Good design should make a product useful
@haio
haio / gist:5072015
Created March 2, 2013 17:10
Lua variable types
nil
boolean --false 和 nil为假,其余为真
number --lua 中没有整数
string --字符串值不可修改 "10" + 1 == 11
--"hello" + 1 ERROR
--"hello" + "world" ERROR
--"i want" .. 10
function
userdata
thread
@haio
haio / gist:5160024
Last active December 14, 2015 22:39
mysql -u -p database < file.sql
mysql -uroot -psss -h 1.1.1.1 -P3306
adduser newuser
passwd newuser
visudo
在root ALL=(ALL) ALL下面加一行
newuser ALL=(ALL) ALL
rvm pkg install openssl
rvm reinstall 1.9.3 --with-openssl-dir=$rvm_path/usr
@haio
haio / gist:5175270
Last active December 15, 2015 00:49
Network 配置文件
Ubuntu:
/etc/network/interfaces
auto lo$
iface lo inet loopback$
# The primary network interface$
auto eth0$
#iface eth0 inet dhcp$
iface eth0 inet static$
address 1.1.8.8$
@haio
haio / gist:5186133
Last active December 15, 2015 02:19
ssh server
sudo apt-get install openssh-server
yum install openssh-server
service sshd start
:set nu
:set ruler