Skip to content

Instantly share code, notes, and snippets.

@haio
haio / gist:5294062
Created April 2, 2013 17:08
remove nginx
sudo apt-get purge nginx-*
sudo apt-get autoremove
若只是喜欢 何必夸张成爱
@haio
haio / gist:5303165
Last active December 15, 2015 18:19
multitail | html2pdf
multitail -l /var/log/sercure -l /var/log/
multitail -R 3 -l 'uptime'
multitail -e 'fail' /var/log/
wkhtmltopdf --use-xserver http://....
@haio
haio / gist:5329095
Last active December 15, 2015 21:58
Git WorkFlow
clone:
git clone git@gitserver:project_name [local_name]
local branch:
git checkout -b branch_name
git merge --squash branch_name
git pull remote_name branch_name (git pull origin master default)
git push
git branch -D branch_name
df -ah
#UPDATE:2013-04-02 21:56
127.0.0.1 localhost
#SmartHosts START
#Google Services START
203.208.46.200 chatenabled.mail.google.com
203.208.46.200 static.googleusercontent.com
203.208.46.200 0.docs.google.com
@haio
haio / gist:5360766
Created April 11, 2013 04:36
Escaping " in Rails and Javascript
<%= raw your_variable %>
@haio
haio / gist:5360780
Created April 11, 2013 04:39
Filter item in arry by num
multi args:
[].values_at(1,2,3)
array:
[].values_at(*[1,2,3])
Add REMI repository:
## Remi Dependency on CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
## CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
## check available mysql version ##
yum --enablerepo=remi,remi-test list mysql mysql-server
时代气质