Skip to content

Instantly share code, notes, and snippets.

@caingougou
caingougou / python easy_install
Created November 21, 2010 16:15
esay_install is a package management system for python
# install easy_install
wget -q http://peak.telecommunity.com/dist/ez_setup.py
# install pyquery by easy_install
easy_intsall pyquery
@caingougou
caingougou / mirror site in specific directory.sh
Created January 7, 2011 03:32
mirror site in specific directory
wget --html-extension --convert-links --page-requisites --execute robots=off --mirror --include-directories /<DIRECTORY>/ http://<HOST>/<PAGE>
@caingougou
caingougou / batch run sql files
Created February 22, 2011 07:41
batch run sql files
find /fold/of/sql/files/ -name "*.sql" |sort -n|awk '{print "source", $0}' | mysql --batch -u root -p -f
/* old */
.clearfix:after {
visibility:hidden;
display:block;
font-size:0;
content:" ";
clear:both;
height:0;
}
.clearfix {
@caingougou
caingougou / route_command.sh
Created May 17, 2011 02:32
指定某地址走固定的网卡网关
sudo route add -host 205.140.203.24 gw 192.168.1.111
[] == []
=>
false
@caingougou
caingougou / 查看端口占用的情况.sh
Created July 20, 2011 03:50
查看端口占用的情况
lsof -i:8080
@caingougou
caingougou / add_ppa_key.sh
Created August 1, 2011 03:39
add key for ppa
gpg --keyserver keyserver.ubuntu.com --recv [8-bit-key]
gpg --export --armor [8-bit-key] | sudo apt-key add -
@caingougou
caingougou / gist:2092617
Created March 19, 2012 03:14
qooxddo splitpane
/* http://tinyurl.com/45yyrxr */
var container = new qx.ui.splitpane.Pane("horizontal");
var w1 = new qx.ui.Widget().set({
backgroundColor : "blue"
});
var w2 = new qx.ui.Widget().set({
backgroundColor : "green"
});
container.add(w1, 1);
@caingougou
caingougou / gist:2092666
Created March 19, 2012 03:15
qooxddo tab view
var tabView = new qx.ui.tabview.TabView();
var page1 = new qx.ui.tabview.Page("Layout", "icon/16/apps/utilities-terminal.png");
page1.setLayout(new qx.ui.layout.VBox());
page1.add(new qx.ui.basic.Label("Page Content"));
tabView.add(page1);
var page2 = new qx.ui.tabview.Page("Notes", "icon/16/apps/utilities-notes.png");
tabView.add(page2);
this.getRoot().add(tabView);