View gist:7723f67e18efba06f0cf
[root@Iven sysconfig]# cat iptables
# Generated by iptables-save v1.4.7 on Mon Jun 1 00:04:12 2015
*nat
:PREROUTING ACCEPT [49:4737]
:POSTROUTING ACCEPT [2:144]
:OUTPUT ACCEPT [2:144]
-A PREROUTING -p tcp -m tcp --dport 22222 -j REDIRECT --to-ports 22
COMMIT
# Completed on Mon Jun 1 00:04:12 2015
# Generated by iptables-save v1.4.7 on Mon Jun 1 00:04:12 2015
View gist:21d83e8c491c0cd1f158
###修改ubuntu初始密码
#sudo passwd root
###修改主机名 
#/etc/hostname
#/etc/hosts
###安装ssh服务
#sudo apt-get install openssh-server
View lock
自旋锁
自适应自旋
锁消除 (eg 方法体内)
锁粗化
轻量级锁 (CAS)
偏向锁
View back.html
<html>
<div id="header">
<a href="javascript:document.getElementById('my_iframe').contentWindow.history.back();" target="iframe">返回</a>
</div>
<div id="main">
<iframe id="my_iframe">内容</iframe>
</div>
</html>
View validate.addmethod.js
var vcity={ 11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",
21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",
33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",
42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",
51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",
63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"
};
isIdCardNo = function(card)
{
View ALG.java
package test.algorithm;
import java.util.Arrays;
/**
* from wiki http://zh.wikipedia.org/wiki/插入排序
* http://zh.wikipedia.org/wiki/归并排序
**/
public class ALG {
View SynchronizedTest.java
package test;
public class SynchronizedTest {
public static void main(String[] args) {
J j = new J();
Thread inc1 = new Thread(new IncrementThread(j), "inc1");
Thread inc2 = new Thread(new IncrementThread(j), "inc2");
Thread dec1 = new Thread(new DecrementThread(j), "dec1");
Thread dec2 = new Thread(new DecrementThread(j), "dec2");
View LoaderTest.java
package test;
/**
*
* @author Administrator
*
*/
public class LoaderTest {
View builder模式.md
View shortcut.md