SIEGE

Siege is an http load testing and benchmarking utility. It was designed to let web developers measure their code under duress, to see how it will stand up to load on the internet. Siege supports basic authentication, cookies, HTTP and HTTPS protocols. It lets its user hit a web server with a configurable number of … Continue reading "SIEGE"

静态文件用nginx直接serve

#css|js|ico|gif|jpg|jpeg|png|txt|html|htm|xml|swf|wav这些都是静态文件,但应分辨,js、css可能经常会变,过期时间应小一些,图片、html基本不变,过期时间可以设长一些 location ~* ^.+\.(ico|gif|jpg|jpeg|png|html|htm)$ { root /var/www/poseidon/root/static; access_log off; expires 30d; } location ~* ^.+\.(css|js|txt|xml|swf|wav)$ { root /var/www/poseidon/root/static; access_log off; expires 24h; } #注:location不包括?后面带的参数,所以以上正则可以匹配http://192.168.1.16/image/sxxx.jpg?a=xxx

Node.js 究竟是什么?

Node 是一个服务器端 JavaScript 解释器,它将改变服务器应该如何工作的概念。它的目标是帮助程序员构建高度可伸缩的应用程序,编写能够处理数万条同时连接到一个(只有一个)物理机的连接代码。   清单 2. Node 随机数字生成器 // these modules need to be imported in order to use them. // Node has several modules. They are like any #include // or import statement in other languages var http = require(“http”); var url = require(“url”); // The most important line in any Node file. … Continue reading "Node.js 究竟是什么?"

Bootstrap

Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created and maintained byMark Otto and Jacob Thornton. To get started, checkout http://getbootstrap.com!

shell 上传目录

#!/bin/bash updir=/root/wav todir=/ sss=`find $updir -type d -printf $todir/’%P\n’| awk ‘{if ($0 == “”)next;print “mkdir ” $0}’` aaa=`find $updir -type f -printf ‘put %p %P \n’` ftp -nv spetechcular.com <<EOF user quantong quantong2013 type binary prompt $sss cd $todir $aaa quit EOF