Created
June 25, 2014 11:22
-
-
Save aaronup/f698c0f9cd52bc5f72ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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