Skip to content

Instantly share code, notes, and snippets.

Hiring chip architect at NVIDIA Shanghai office.

Max Lv madeye

Hiring chip architect at NVIDIA Shanghai office.
View GitHub Profile
View dns-black-list
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
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();
#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 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,
* 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
/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/
/opt/local/bin/kill `cat /root/`
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- ]; then rm -f /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc- /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-; fi; echo "libc" >> /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-
if [ -f /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc- ]; then rm -f /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc- /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-; fi; echo "libgcc" >> /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.
View test