Skip to content

Instantly share code, notes, and snippets.

Avatar
🚗
Hiring chip architect at NVIDIA Shanghai office.

Max Lv madeye

🚗
Hiring chip architect at NVIDIA Shanghai office.
View GitHub Profile
View dns-black-list
0.0.0.0
2.1.1.2
4.36.66.178
4.193.80.0
8.7.198.45
8.105.84.0
12.87.133.0
14.102.249.18
16.63.155.0
20.139.56.0
View gist:dc82b97b1ed305a96894
ipset create blacklist hash:ip hashsize 4096
iptables -I INPUT -m set --match-set blacklist src -p TCP -j REJECT
ipset add blacklist 157.122.147.190
@madeye
madeye / loop
Created Nov 14, 2011
parallel loop
View loop
#include <omp.h>
int main(int args, char **argv) {
int procs = omp_get_num_procs();
omp_set_num_threads(procs);
#pragma omp parallel
while (1);
return 0;
}
View gist:4491444
22213: shadowsocks-server
08048000 1708K r-x-- /usr/local/go/bin/shadowsocks-server
081f3000 68K rw--- /usr/local/go/bin/shadowsocks-server
08204000 4164K rw--- [ anon ]
08700000 261888K ----- [ anon ]
186c0000 2304K rwx-- [ anon ]
18900000 522240K ----- [ anon ]
b4ad5000 4K ----- [ anon ]
b4ad6000 8188K rw--- [ anon ]
b52d5000 256K rwx-- [ anon ]
View gist:5107642

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

View nicstat.c
/*
* nicstat - print network traffic, Kb/s read and written. Solaris 8+.
* "netstat -i" only gives a packet count, this program gives Kbytes.
*
* 25-Jul-2006, ver 0.92 (check for new versions, http://www.brendangregg.com)
*
* COMPILE:
* cc -lgen -lkstat -lrt -o nicstat nicstat.c
*
* USAGE: nicstat [-hsz] [-i int[,int...]] | [interval [count]]
View mrtg.cfg
# Created by
# /opt/local/bin/cfgmaker --global "WorkDir: /opt/local/www/munin" --output /opt/local/etc/mrtg.cfg --ifref=name --ifref=descr public@localhost
### Global Config Options
### Global Defaults
LoadMIBs: /etc/sma/snmp/mibs/IF-MIB.txt
EnableIPv6: no
View shadowsocks
case "$1" in
start)
/usr/bin/ulimit -n 51200
/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 4096
/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q0 8192
/opt/local/bin/ss-server -c /root/config.json -f /root/ss.pid
;;
stop)
/opt/local/bin/kill `cat /root/ss.pid`
;;
View gist:7180178
make[1]: Entering directory `/home/max/openwrt/trunk'
make[2]: Entering directory `/home/max/openwrt/trunk/package/libs/toolchain'
if [ -f /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.
View test
[proxy_all]
[outbound_block_list]
(^|\.)\w*admarvel\w*\..*$
(^|\.)\w*admaster\w*\..*$
(^|\.)\w*adsage\w*\..*$
(^|\.)\w*adsensor\w*\..*$
(^|\.)\w*adsh\w*\..*$
(^|\.)\w*adsmogo\w*\..*$