2010年9月 Archives

cat /proc/swaps
free -m

dd if=/dev/zero of=swapfile bs=1M count=8192
swapoff -a

mkswap swapfile
swapon swapfile

cat /etc/fstab
/usr/swapfile swap    swap    defaults        0       0

| | Comments (0) | TrackBacks (0)

com.handcent.nextsms-1.apk   send chinese sms

FMRadio_milestone.apk           FMRadio for milestone 

 
| | Comments (0) | TrackBacks (0)

#install openvpn and resovconf
$sudo apt-get install openvpn
$sudo apt-get install resovconf

$sudo cat client.conf.mytest
client
;dev tap
dev tun
;dev-node MyTap
proto tcp
;proto udp
remote your-vpn-domain 1001
remote your-vpn-domain 1002
remote-random
resolv-retry infinite
nobind
;user nobody
;group nogroup
persist-key
persist-tun
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
;mute-replay-warnings
ca /home/2hei.net/.vpn/ca.crt
cert /home/2hei.net/.vpn/client.crt
key /home/2hei.net/.vpn/client.key
ns-cert-type server
;tls-auth ta.key 1
;cipher x
comp-lzo
verb 3
;mute 20
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

#start openvpn
$sudo openvpn --script-security 3 --config /home/2hei.net/.vpn/client.conf.mytest

| | Comments (0) | TrackBacks (0)

Just mark it. :-)

#!/bin/sh
awk -F"_t_7_Y_" '{if($1==1) {printf $2; for(i=3;i<=NF;i++) if(i==NF) print $i;else printf $i}}' temp1  > 1.txt
awk -F"_t_7_Y_" '{if($1==2) if($2 in S22){S22[$2]=$2;S23[$2]=$3" "S23[$2];N2[$2]++}else {S22[$2]=$2;S23[$2]=$3;N2[$2]=1;} if($1==3) if($2 in S32){S32[$2]=$2;S33[$2]=$3" "S33[$2];N3[$2]++}else {S32[$2]=$2;S33[$2]=$3;N3[$2]=1;} if($1==4) if($2 in S42){S42[$2]=$2;S43[$2]=$3" "S43[$2];N4[$2]++}else {S42[$2]=$2;S43[$2]=$3;N4[$2]=1;} }END{for(i in S22) print S22[i],N2[i],S23[i]>>"2.txt";for(i in S32) print S32[i],N3[i],S33[i]>>"3.txt"; for(i in S42) print S42[i],N4[i],S43[i]>>"4.txt";}' temp1

awk 'NR==FNR {for(i=2;i<=NF;i++) S[$1]=S[$1]" "$i;}NR>FNR{print $0" "S[$1]}' 2.txt 1.txt > t1.txt
awk 'NR==FNR {for(i=2;i<=NF;i++) S[$1]=S[$1]" "$i;}NR>FNR{print $0" "S[$1]}' 3.txt t1.txt > t2.txt
awk 'NR==FNR {for(i=2;i<=NF;i++) S[$1]=S[$1]" "$i;}NR>FNR{print $0" "S[$1]}' 4.txt t2.txt > final.txt

| | Comments (0) | TrackBacks (0)