Skip to content

Instantly share code, notes, and snippets.

@wwgc
wwgc / tc.sh
Created August 17, 2016 07:14 — forked from jedy/tc.sh
tc带宽控制
#!/bin/bash
#脚本文件名: tc2
#########################################################################################
#用TC(Traffic Control)解决ADSL宽带速度技术 Ver. 1.0 by KindGeorge 2004.12.27 #
#########################################################################################
#此脚本经过实验通过,更多的信息请参阅http://lartc.org
#tc+iptables+HTB+SFQ
#
#一.什么是ADSL? ADSL(Asymmetric Digital Subscriber Loop,非对称数字用户环路)
#用最简单的话的讲,就是采用上行和下行不对等带宽的基于ATM的技术.
@wwgc
wwgc / gist:364cd526dcd0a61b0c6f65be2d88d3cd
Created March 21, 2017 02:45 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@wwgc
wwgc / gist:aa3cbd90059749f909f94b3405497ff0
Created March 21, 2017 03:08
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@wwgc
wwgc / shadowsocks-quota
Created March 22, 2017 12:20 — forked from larvata/shadowsocks-quota
shadowsocks bandwidth limit and data quota each port
# draft
# view current data quota
sudo iptables -nvL -t filter --line-numbers
# init
sudo iptables -I OUTPUT -p tcp --sport <target-port> -m quota --quota <quota-bytes> -j ACCEPT
sudo iptables -I OUTPUT -p tcp --sport <target-port> -j DROP
# reset quota
@wwgc
wwgc / wstorm-cheatsheet.md
Created March 24, 2017 14:56 — forked from tylertadej/wstorm-cheatsheet.md
WebStorm keyboard shortcuts

WebStorm keyboard shortcuts

List of helpful keyboard shortcuts for IntelliJ WebStorm 8 running on OSX
Alt+Up                Select text blocks in incrementing size
Alt+Down              Deselect text blocks in decreasing size
Shift+Shift           Search Everywhere pop-up window
@wwgc
wwgc / tc
Created August 6, 2018 08:17 — forked from swshan/tc
openwrt tc
#!/bin/sh
#DEV 内网接口,ODEV外网接口)
IDEV="br-lan"
ODEV="pppoe-wan"
# 定义总的上下带宽
UP="0.45mbit"
DOWN="9mbit"