三张「饿了么」的五元抵用券。用不上,有用的拿去吧。 at 子时正刻 – View on Path .
三张「饿了么」的五元抵用券。用不上,有用的拿去吧。 at 子时正刻 – View on Path.
break the wall or bring the war
三张「饿了么」的五元抵用券。用不上,有用的拿去吧。 at 子时正刻 – View on Path.
写了个很简单的,点击 Ed2k 连接直接调用迅雷离线下载的 Safari 插件。 Safari Extension Download: https://github.com/downloads/Leask/ED2K-Xunlei-Lixian/ED2K_Xunlei-Lixian.safariextz Sources on GitHub: https://github.com/Leask/ED2K-Xunlei-Lixian
淘宝,我终于忍无可忍了,受够了你老是逗我玩!让“十天免登陆”功能彻底成为笑话吧! Safari Extension Download: https://github.com/downloads/Leask/Bazinga/Bazinga.safariextz Sources on GitHub: https://github.com/Leask/Bazinga
有人在 twitter 上问我的 bash prompt 是怎么写的,简单解说无效,直接把代码贴出来吧: git_inspect_branch() { git branch 2> /dev/null | grep ^* | sed 's/^\* \(.*\)$/:\1/g'<br /> } git_inspect_added() { [[ $(git status 2> /dev/null | grep 'Untracked files:') != '' ]] && echo '+'<br /> } git_inspect_modified() { [[ $(git status 2> /dev/null | grep 'modified:') != '' ]] && echo '*'<br /> } git_inspect_deleted() { [[ $(git status 2> /dev/null | grep 'deleted:') != "" ]] && echo "-"<br /> } git_inspect_dirty() { echo "$(git_inspect_added)$(git_inspect_modified)$(git_inspect_deleted)"<br /> } NME="\u"<br /> HST="\h"<br /> DIR="\w"<br /> PMT="\$"<br /> RED="\[\033[31m\]"<br /> GEN="\[\033[32m\]"<br /> YEL="\[\033[33m\]"<br /> OFF="\[\033[m\]"<br /> MOD="\`if [ \$? = 0 ]; then echo :\); else echo :\(; fi\`"<br /> GIT="\`git_inspect_branch\`"<br /> DIF="\`git_inspect_dirty\`"<br /> PMT="\`if [ "$(id -u)" = "0" ]; then echo '#'; else echo '>'; fi\`"<br /> PS1="$MOD $NME@$RED$HST$OFF:$DIR$GEN$GIT$OFF$RED$DIF$OFF$PMT " PS: Prompt 不包括那头小牛,那头小牛其实是这样写的: alias cowtune=’fortune cowsay’ Updated[Dec 5, 2012]: 放到 Github 上了 https://gist.github.com/4153091
十八大以来,网络就越发异常了,VPN 断断续续,工作受影响严重。盼星星盼月亮终于盼走了十八大。没想到网络依旧不好用,看来党妈已经想把封锁 VPN 作为常规策略了。幸好 ssh 还好用,于是借机会升级了 Flora_Pac 项目,加入了几个大家都比较期待的小功能,合并了 @forresty 的 fork 的部分代码,现在基本能用了。 项目介绍:https://leaskh.com/2011/12/02/用-Flora_Pac.py-生成自动翻墙的-pac-文件/ 项目地址:https://github.com/Leask/Flora_Pac 具体改动: leask@Flora:~/Documents/Working/Flora_Pac:master> git diff ee2e8e83b2ca5b4d178c091555d99a67d0bcb7fa diff --git a/README.md b/README.md new file mode 100644 index 0000000..c2de47f --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Generate proxy auto-config rules. (Working with GFW) \ No newline at end of file diff --git a/flora_pac.py b/flora_pac.py old mode 100644 new mode 100755 index 528e29a..317335e --- a/flora_pac.py +++ b/flora_pac.py @@ -20,20 +20,27 @@ def generate_pac(proxy): "// Flora_Pac by @leaskh"<br /> "\n// www.leaskh.com, i@leaskh.com"<br /> "\n"<br /> - "\nfunction FindProxyForURL(url, host)"<br /> - "\n{"<br /> + "\nfunction FindProxyForURL(url, host) {"<br /> "\n"<br /> "\n var list = ["<br /> + "\n ['192.168.0.0', '255.255.0.0'],"<br /> ) intLines = 0 for ip,mask,_ in results: if intLines > 0: strLines = strLines + ','<br /> intLines = intLines + 1 - strLines = strLines + "\n ['%s', '%s']"%(ip, mask) + strLines = strLines + "\n ['%s', '%s']"%(ip, mask) strLines = strLines + ( "\n ];"<br /> "\n"<br /> + "\n if (isPlainHostName(host)"<br /> + "\n || (host == '127.0.0.1')"<br /> + "\n || (host == 'localhost')"<br /> + "\n || (/\\b([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\\b/.test(host))) {"<br /> + "\n return 'DIRECT';"<br /> + "\n }"<br /> + "\n"<br /> "\n var ip = dnsResolve(host);"<br /> "\n"<br /> "\n for (var i in list) {" 还是那一句,希望早日不用折腾这些事儿吧。
烤鱼! at 子时正刻 – View on Path.
继续烤肉!😄 at 子时正刻 – View on Path.
Cool!大肉! at 子时正刻 – View on Path.
最终还是要靠高科技。 at 子时正刻 – View on Path.
霍叔烧烤是职业玩家啊! at 子时正刻 – View on Path.