Skip to content

Instantly share code, notes, and snippets.

@veapon
veapon / gist:5590312
Last active December 17, 2015 09:49
Install beta version pear/pecl extension
pear config-set preferred_state beta
pecl install package-beta
@veapon
veapon / gist:5590325
Created May 16, 2013 08:44
Uninstall self-complie mysql using cmake in linux.
cd /path/to/msyql_src
xrgs rm < install_mainfest.txt
rm -rf /path/to/DCMAKE_INSTALL_PREFIX
@veapon
veapon / gist:5780292
Last active December 18, 2015 12:09
openvz&xen vps nat
openvz: iptables -t nat -A POSTROUTING -s 10.8.0.0/255.255.255.0 -j SNAT --to-source your-vps-ip
xen: iptables -t nat -A POSTROUTING -o eth0 -s 10.8.0.0/24 -j MASQUERADE
@veapon
veapon / Exclude the children in a DOM event.
Created June 21, 2013 10:03
Exclude the children in a DOM event.
$('#tree').mouseover(function(e){
if(e.target==this) $(this).css('background','#FFC');
// or
if( $(this).is( $('#tree') ) ) $(this).css('background','#FFC');
});
@veapon
veapon / CSS3 Gradient
Created August 7, 2013 06:33
CSS3 Gradient
-webkit-linear-gradient( [<point> || <angle>,]? <stop>, <stop> [, <stop>]* )
link: http://www.cnblogs.com/lhb25/archive/2013/02/17/css3-linear-gradient.html
@veapon
veapon / ubuntu cursor theme
Created September 5, 2013 01:02
ubuntu cursor theme
vi /usr/share/icon/default/index.theme
In [Icon Theme], set:
Inherits=DMZ-Black
Logout & Login
http://www.linuxidc.com/Linux/2013-07/87062.htm
#!/bin/bash
####################
# REQUIRE PACKAGES
# Nginx
# Mysql
# Memcached
# libmcrypt,mhash,mcrypt,re2c
# PHP
#####################
http://lesca.me/archives/iptables-tutorial-structures-configuratios-examples.html
http://www.cnblogs.com/wangkangluo1/archive/2012/04/19/2457072.html
iptables -I INPUT -p tcp --dport 22 -j ACCEPT
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
service iptables save
@veapon
veapon / ubuntu adv compiz effects
Created October 18, 2013 06:44
ubuntu adv compiz effects
sudo apt-get install compiz-plugins-extra