This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install esseintal packages for opencv | |
apt-get -y install build-essential | |
apt-get -y install cmake | |
apt-get -y install pkg-config | |
apt-get -y install libgtk2.0-dev libgtk2.0 | |
apt-get -y install zlib1g-dev | |
apt-get -y install libpng-dev | |
apt-get -y install libjpeg-dev | |
apt-get -y install libtiff-dev | |
apt-get -y install libjasper-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install instruction for nodejs, compoundjs framework on debian/ubuntu linux | |
apt-get update | |
apt-get install curl vim git-core | |
curl https://raw.github.com/creationix/nvm/master/install.sh | sh | |
# append the following two lines into ~/.bashrc, e.g. /root/.bashrc | |
# [[ -s /root/.nvm/nvm.sh ]] && . /root/.nvm/nvm.sh # This loads NVM | |
# [[ -r $NVM_DIR/bash_completion ]] && . $NVM_DIR/bash_completion | |
# re-login console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Spoofed SYN by eKKiM | |
Educational purpose only please. | |
Compile with | |
gcc syn.c -pthread | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <netinet/tcp.h> | |
#include <netinet/ip.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
問題 | |
ERROR 1129 (HY000): Host 'xx-xx-xx-xx-adsl-tpe.STATIC.so-net.net.tw' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' | |
解決方法 | |
找一台可以還可以登入mysql server的機器 執行以下指令 | |
mysqladmin -uroot -p -h{mysql server的位置} flush-hosts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this practice is base on this documents http://nodejs.org/api/http.html#http_request_connection | |
var server, | |
ip = "192.168.1.12", | |
port = 1337, | |
http = require('http'); | |
server = http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
console.log("========== syslog ========== \n"+req.method+"\n"+req.url+"\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteCond $1 !^(index\.php|assets|robots\.txt|\.jpg|\.jpeg|\.png|\.doc|\.pdf|\.gif|\.bmp|\.ico|\.js|\.css) | |
RewriteRule ^(.*)$ index.php?/$1 [L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#bash <(curl -fsSLk https://raw.github.com/gist/3904123) | |
#install packages | |
apt-get update | |
apt-get -y install apache2 | |
apt-get -y install php5 | |
apt-get -y install vim | |
apt-get -y install git-core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######### I/O benchmark over network file system (RW random,1 thread) ######### | |
root@debian:/mnt/www# sysbench --test=fileio --file-total-size=100M --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run | |
sysbench 0.4.12: multi-threaded system evaluation benchmark | |
Running the test with following options: | |
Number of threads: 1 | |
Initializing random number generator from timer. | |
Extra file open flags: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
表單驗證好書推薦 | |
http://www.pcstore.com.tw/69book/M07276721.htm | |
form recovery (plugin , 小金人) | |
字數限制應該可以讓使用者輸入超過字數 | |
提示的訊息 提示的全面性 提示的即時性 (最怕內容被拖拉填入) , autucomplete | |
http://registrano.com/events/jstw-20120906 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#bash <(curl -fsSLk https://raw.github.com/gist/3496983) | |
yum -y install sudo | |
yum -y install ImageMagick | |
yum -y install wget | |
yum -y install make | |
yum -y install gcc | |
yum -y install libtool |