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
#/tmp/openvpncl/openvpn.conf | |
ca /tmp/openvpncl/ca.crt | |
cert /tmp/openvpncl/client.crt | |
key /tmp/openvpncl/client.key | |
management 127.0.0.1 5001 | |
management-log-cache 50 | |
verb 4 | |
mute 5 | |
log-append /var/log/openvpncl |
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
options { | |
listen-on port 53 { 127.0.0.1; }; | |
directory "/var/named"; | |
dump-file "/var/named/data/cache_dump.db"; | |
statistics-file "/var/named/data/named_stats.txt"; | |
memstatistics-file "/var/named/data/named_mem_stats.txt"; | |
forwarders { 114.114.114.114; 114.114.115.115; }; | |
forward only; |
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 | |
if [[ $# -ne 2 ]]; then | |
echo "./enable_alternative_gw.sh original_gw alternative_gw" | |
exit 1 | |
fi | |
original_gw=$1 | |
gw=$2 |
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 | |
ip_file=$1 | |
if [[ -s $ip_file ]]; then | |
iptables -F -t nat | |
while read ip | |
do | |
iptables -t nat -A POSTROUTING -s $ip -j MASQUERADE | |
done <$ip_file | |
else |
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 | |
[[ -d /Library/Internet\ Plug-Ins/disabled ]] || sudo mkdir -p /Library/Internet\ Plug-Ins/disabled | |
sudo rm -rf /Library/Internet\ Plug-Ins/disabled/JavaAppletPlugin.plugin | |
sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled | |
sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin | |
sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws | |
echo "Switched to Java6, 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
#!/bin/bash | |
host=$1 | |
port=$2 | |
rc=$(curl -I http://$host:$port/stats 2>/dev/null | grep -c 'HTTP/1.1 200 OK') | |
if [[ $rc -eq 1 ]]; then | |
exit 0 | |
else |
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
w32tm /config /update /manualpeerlist:121.9.243.170 | |
w32tm /resync |
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
t.co | |
j.mp | |
twitter.com | |
google* |
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
# 1. Make sure you have nginx sub module compiled in | |
# nginx -V 2>&1 | grep --color=always '\-\-with\-http_sub_module' | |
# 2. add two directives below at HTTP level | |
# nginx.conf | |
http { | |
# ...... | |
sub_filter '</head>' '<style type="text/css">html{ filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter: grayscale(100%); filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ |
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 | |
if [ $# -lt 3 ];then | |
echo "usage: $pid $key $value" | |
exit 1 | |
fi | |
pid=$1 | |
key=$2 | |
value="${3}ll" |
NewerOlder