Skip to content

Instantly share code, notes, and snippets.

@hyliker
hyliker / shadowsocks-quota
Created October 21, 2017 09:57 — 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
@hyliker
hyliker / gist:0165797666aa2b08f42e
Created September 1, 2015 15:46
start a django ipython shell
#!/bin/sh
DJANGO_SETTINGS_MODULE='project-name.settings' ipython

1. Ensure that Terminal declares itself as "xterm-256color"

Under Terminal > Preferences... > (Profile) > Advanced, "Declare terminal as:" should be set to "xterm-256-color".

2. Build a version of screen that supports 256 colors

This is easy with homebrew:

brew tap homebrew/dupes