Skip to content

Instantly share code, notes, and snippets.

@aaronup
Created June 25, 2014 11:22
Show Gist options
  • Select an option

  • Save aaronup/f698c0f9cd52bc5f72ae to your computer and use it in GitHub Desktop.

Select an option

Save aaronup/f698c0f9cd52bc5f72ae to your computer and use it in GitHub Desktop.
#!/bin/sh
#Here are some shell shortcuts you can use to slow down your localhost.
#based on: http://www.railsillustrated.com/simulating-a-web-experience.html
#Sourced from: https://plus.google.com/106413090159067280619/posts/1K9fgqfn8zY
function slowport {
# Choose whatever speed you like in the first line.
sudo ipfw pipe 1 config bw 50KByte/s;
sudo ipfw add 1 pipe 1 src-port $1;
sudo ipfw add 1 pipe 1 dst-port $1;
}
function fastport {
sudo ipfw delete 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment