Skip to content

Instantly share code, notes, and snippets.

@quirkey
Created October 2, 2013 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quirkey/6796367 to your computer and use it in GitHub Desktop.
Save quirkey/6796367 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Bandwidth throttling for OSX,
# http://www.macosxhints.com/article.php?story=20080119112509736
case "$1" in
'start')
KB=$2
echo Throttling at $KB Kbytes/s
sudo ipfw pipe 1 config bw "$KB"KByte/s
sudo ipfw add 1 pipe 1 src-port 80
;;
'stop')
sudo ipfw delete 1
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment