This file contains 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
// get all books | |
scope.books = Books.getBooks(); | |
// test if route included revision | |
if (!routeParams.bookRevision) { | |
// test if route included book key | |
if (!routeParams.bookKey) { | |
// take first book from the collection | |
scope.book = scope.books[0]; | |
// TODO: this is where we would call updatePath for bookKey |
This file contains 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
you can run the command: "nettop -m tcp" in the terminal to show you all the tcp connections such as uploading and downloading. locate the host that is responsible for the bandwidth activity that is maxing out your internet, whether it be uploading or downloading then you can use the tool ipfw (ip firewall) to limit the bandwidth to that host. I'll use my scenario as an example. I was uploading to largedocument.com (discovered the host with nettop) I can run the following two commands to limit the upload speed to largedocument.com to 25Kbits/s by running: | |
sudo ipfw pipe 1 config bw 25KByte/s | |
sudo ipfw add 1 pipe 1 dst-ip largedocument.com | |
this works great! upload to largedocument.com is reduced to 25 kb/s. And then to remove the bandwidth limitation later, just run the command: | |
sudo ipfw delete 1 |