This file contains 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
#apple | |
#nslookup -vc a1.phobos.apple.com 168.95.1.1 | |
#203.78.36.42 203.69.138.18 | |
#jp 120.29.145.9 124.40.51.32 61.213.183.25 | |
address=/a1.mzstatic.com/203.69.138.18 | |
address=/a2.mzstatic.com/203.69.138.18 | |
address=/a3.mzstatic.com/203.69.138.18 | |
address=/a4.mzstatic.com/203.69.138.18 | |
address=/a5.mzstatic.com/203.69.138.18 | |
address=/a6.mzstatic.com/203.69.138.18 |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#include <netinet/in.h> | |
#include <signal.h> |
This file contains 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 | |
oldgw=10.211.55.1 | |
vpngw=10.100.0.1 | |
poff | |
route del default gw $oldgw | |
route del default gw $vpngw | |
route add default gw $oldgw |
This file contains 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 | |
#set the VPN service name | |
VPN="" | |
function xxre () { | |
echo "VPN is not connected!" | |
echo "Reconnecting!" | |
networksetup -connectpppoeservice $VPN | |
sleep 5 | |
} | |
ifconfig|grep ppp0||xxre |
This file contains 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 | |
year=2010 | |
mon=01 | |
day=01 | |
case $mon in | |
01) monname="Jan" ;; | |
02) monname="Feb" ;; | |
03) monname="Mar" ;; | |
04) monname="Apr" ;; |
This file contains 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 | |
# sudo chmod +x tc;sudo mv tc /usr/bin | |
if [[ -z "$1" ]] | |
then | |
printf %s "\ | |
Nifty Timestamp Convertor by Lex Tang | |
tc 2012/12/12 | |
tc 1355283413 | |
" | |
exit |
This file contains 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
#!/usr/bin/expect | |
set timeout 60 | |
while {1} { | |
spawn /usr/bin/ssh -NCD :7070 111111@111.com | |
expect { | |
"password:" { send "111111\r" } | |
} | |
interact { | |
timeout 60 { send " " } | |
eof { exp_continue } |
This file contains 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 | |
# sh evernoteAdBlock.sh | |
cd ~/Library/Application\ Support/Evernote/promos/ | |
rm `ls|grep -v stats.plist` | |
chmod 555 ../promos |
This file contains 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 | |
PATH=$PATH:/usr/local/sbin:/Volumes/data/stuff/code/android-sdk-macosx/platform-tools | |
for file in `ls|grep .apk` | |
do | |
echo $file | |
adb install $file | |
done |
This file contains 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
#!/usr/bin/env python | |
# | |
# Refined by @phuslu | |
# Flora_Pac by @leaskh | |
# www.leaskh.com, i@leaskh.com | |
# | |
# based on chnroutes project (by Numb.Majority@gmail.com) | |
# | |
import re |
OlderNewer