start new:
tmux
start new with session name:
tmux new -s myname
| <?php | |
| /** | |
| * Convert a comma separated file into an associated array. | |
| * The first row should contain the array keys. | |
| * | |
| * Example: | |
| * | |
| * @param string $filename Path to the CSV file | |
| * @param string $delimiter The separator used in the file | |
| * @return array |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| mkdir demo | |
| cd demo | |
| wget http://www.magentocommerce.com/downloads/assets/1.8.1.0/magento-1.8.1.0.tar.gz | |
| wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz | |
| tar -zxvf magento-1.8.1.0.tar.gz | |
| tar -zxvf magento-sample-data-1.6.1.0.tar.gz | |
| mv magento-sample-data-1.6.1.0/media/* magento/media/ | |
| mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql magento/data.sql | |
| mv magento/* magento/.htaccess . | |
| chmod o+w var var/.htaccess app/etc |
| /* | |
| @Name: V2EX reply pusher on HTML5 notification API | |
| @URL: http://hzlzh.github.com/project/v2ex-notification/ | |
| @Twitter: @hzlzh | |
| */ | |
| // notification close delay time | |
| var AUTO_CLOSE_DELAY_SECONDS = 6, updated_time = '', | |
| refresh_time = 5, | |
| V2EX_RSS = $('.sll').val(); |
| /* | |
| * A white-list based PAC without regexp, by @janlay | |
| * It's just simple and fast. | |
| * Last update: Oct 20, 2015 | |
| * Special thanks to @Paveo | |
| */ | |
| function FindProxyForURL(url, host) { | |
| // REPLACE PROXY WITH YOUR OWN'S | |
| var PROXY = "SOCKS 127.0.0.1:8801;SOCKS5 127.0.0.1:8801;PROXY 127.0.0.1:8800"; | |
| var BLACKHOLE = "127.0.0.2"; |
| 127.0.0.1, anrdoezrs.net, *.anrdoezrs.net, w3ctech.com, *.w3ctech.com, hdtdxp.com, *.hdtdxp.com, uuzuonline.com, *.uuzuonline.com, luzhou.net, *.luzhou.net, cjphr.com, *.cjphr.com, fridaying.com, *.fridaying.com, bjokli.com, *.bjokli.com, 93txt.com, *.93txt.com, robotplayer.com, *.robotplayer.com, upai99.com, *.upai99.com, gemsky.net, *.gemsky.net, 00base.com, *.00base.com, mebi9t.com, *.mebi9t.com, is686.com, *.is686.com, cdncache.org, *.cdncache.org, sucaitianxia.com, *.sucaitianxia.com, 89178.com, *.89178.com, 5dmail.net, *.5dmail.net, oy66.com, *.oy66.com, shanghaining.com, *.shanghaining.com, book118.com, *.book118.com, zsbeike.com, *.zsbeike.com, hunantv.com, *.hunantv.com, ylunion.com, *.ylunion.com, mysilu.com, *.mysilu.com, 0737mp.com, *.0737mp.com, 37cu.com, *.37cu.com, longre.com, *.longre.com, yanzheng.com, *.yanzheng.com, lifeyoyo.com, *.lifeyoyo.com, wulinyingxiong.net, *.wulinyingxiong.net, yong9.net, *.yong9.net, communicatte.com, *.communicatte.com, ok92.net, *.ok92.net, junshishu.com, *.juns |
| function show_status($done, $total, $size=30) { | |
| static $start_time; | |
| // if we go over our bound, just ignore it | |
| if($done > $total) return; | |
| if(empty($start_time)) $start_time=time(); | |
| $now = time(); |
##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 可用,但端口一致,就设置这个
This Gist shows how to use Open vSwitch to bridge Docker containers on two hosts. It is based on this blog post http://goldmann.pl/blog/2014/01/21/connecting-docker-containers-on-multiple-hosts/.
A similar Gist using Tinc instead of Open vSwitch is available: https://gist.github.com/noteed/11031504.