顯示具有 others 標籤的文章。 顯示所有文章
顯示具有 others 標籤的文章。 顯示所有文章

2012年10月29日 星期一

Drop Multiple MySQL tables

You can show tables with wildcard character on MySQL server.
ie: SHOW TABLES LIKE 'PREFIX_%';

But can't drop multiple tables with '%'.

[HowTo]
For shell script:

for T in `echo "SHOW TABLES" |mysql db|grep "^PREFIX_"`; do echo "DROP TABLE $T;"|mysql db;done

enjoy it.
:D

2012年6月27日 星期三

flash simulate low bandwidth

flash 發佈時,需測試低頻寬下 loading 的狀況
之前是用 ccproxy 但常被防毒軟體誤判,
改用 sloppy 簡單用好用。

2011年12月6日 星期二

wget tip


用來用去還是 wget 最好用呀~~

enable cookies
wget --cookies=on --keep-session-cookies --save-cookies=cookie.txt http://your.url

referer url and load cookies
wget --referer=http://your.referer.url --cookies=on --load-cookies=cookie.txt http://your.url

post data
wget --post-file post.txt http://your.url
wget --post-data="type=APP&nick=nickname" http://your.url

in post.txt(on windows)
type=APP&nick=nickname

user agent
--user-agent="Mozilla/5.0"