Skip to content

Instantly share code, notes, and snippets.

@linhua55
linhua55 / ss-redir 透明代理.md
Created December 4, 2015 08:38 — forked from wen-long/ss-redir 透明代理.md
ss-redir 透明代理.md

##ss-redir 的 iptables 配置(透明代理)

透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则

创建 /etc/ss-redir.json 本地监听 7777 运行ss-redir -v -c /etc/ss-redir.json

iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个
@linhua55
linhua55 / springer-free-maths-books.md
Created December 29, 2015 08:28 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@linhua55
linhua55 / simpler
Created January 6, 2016 09:25 — forked from benizi/simpler
Show how different terminals show bold colors
#!/bin/sh
# Print four lines showing blocks of colors: 0-7 | 0-7bold | 8-15 | 8-15bold
perl -CADS -lwe '
my $block = shift || (chr(0x2588) x 3);
for (["", 0], ["1;", 0], ["", 8], ["1;", 8]) {
my ($bold, $offset) = @$_;
my @range = map $offset + $_, 0..7;
printf "%s %-6s ", $bold ? "bold" : "norm", "$range[0]-$range[-1]";
print map("\e[${bold}38;5;${_}m$block", @range), "\e[0m"
}
"http://cache.gensee.com/gsgetrecord/record3.gensee.net/gsrecord/9532/sbr/2015_12_10/62d12e9ed43b4b37a4706c8f4a4197e4_1449707515/hlppighili.grf"
"http://cache.gensee.com/gsgetrecord/record3.gensee.net/gsrecord/9532/sbr/2015_12_10/62d12e9ed43b4b37a4706c8f4a4197e4_1449707515/phklkjlpm.grf"
"http://cache.gensee.com/gsgetrecord/record3.gensee.net/gsrecord/9532/sbr/2015_12_10/62d12e9ed43b4b37a4706c8f4a4197e4_1449707515/ioooljlhmi.grf"
"http://cache.gensee.com/gsgetrecord/record3.gensee.net/gsrecord/9532/sbr/2015_12_10/62d12e9ed43b4b37a4706c8f4a4197e4_1449707515/jjgonpmnko.grf"
"http://cache.gensee.com/gsgetrecord/record3.gensee.net/gsrecord/9532/sbr/2015_12_10/62d12e9ed43b4b37a4706c8f4a4197e4_1449707515/ipmgoiinig.grf"
"http://cache.gensee.com/gsgetrecord/record3.gensee.net/gsrecord/9532/sbr/2015_12_10/62d12e9ed43b4b37a4706c8f4a4197e4_1449707515/ihhgkgijpo.grf"
"http://cache.gensee.com/gsgetrecord/record3.gensee.net/gsrecord/9532/sbr/2015_12_10/62d12e9ed43b4b37a4706c8f4a4197e4_1449707515/ihkpllhngk.grf"
"http://ca
@linhua55
linhua55 / jdk_download.sh
Created April 3, 2016 18:02 — forked from P7h/jdk_download.sh
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@linhua55
linhua55 / 0-EndnoteProcess.md
Created June 9, 2016 15:59 — forked from platinhom/0-EndnoteProcess.md
DOI-endnote-process

Scripts for endnote librart processing.

  • modifyXML.py: To deal with nonsense chars in "Notes" column, reserve Time Cited information; modify improper doi format (remove DOI:, litter case)
  • prepareDOI.py: To pre-process doi number for getPDF.py script.
  • getPDF.py: Search PDF for endnote XML DOI records based on scihub.
    Save the doi number in a file (one doi per line) and use the file as script input.
    Each file save as "10.1021_ci111111a.pdf" in current directory. You have to move the valid file to "Done" Directory and use addPDF.py.
  • addPDF.py: Put found PDF in "Done" Directory, Some pdf don't want to search anymore in "Accept".
    Give a endnote XML as input. Move the PDF to a directory based on doi-paper number. A new xml file will be generated.
    Move all the directories in "Done" to "Endnote library.Data/PDF" and import the new xml file. You may delete old records firstly.
@linhua55
linhua55 / introrx.md
Created August 2, 2016 15:05 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@linhua55
linhua55 / Debug.smali
Created October 23, 2016 15:26 — forked from fffonion/Debug.smali
wlanchang smali auto inject
.class public Lcom/test/Debug;
.super Ljava/lang/Object;
# static fields
.field public static final DEBUG_BILLING_DUMMY:Z = false
.field public static final DEBUG_CHECK_MD5:Z = false
.field public static final DEBUG_DISABLE_EVIDENCE:Z = false
@linhua55
linhua55 / china-ai-robotics-vc.md
Created December 7, 2016 13:08 — forked from tzmartin/china-ai-robotics-vc.md
China has now eclipsed US in AI / deep-learning research, robotics and VC funding (government-backed $338 billion)