Skip to content

Instantly share code, notes, and snippets.

View nathan-muir's full-sized avatar

Nathan Muir nathan-muir

View GitHub Profile
#!/bin/sh
tc qdisc del dev eth0 root 2> /dev/null
if [ "z$1" = "zdialup" ] ; then
echo "Brace yourself, enabling dialup preset..."
BANDWIDTH=56kbit
LATENCY=200msec
elif [ "z$1" = "z2g" ] ; then
echo "Enabling 2G preset..."
#!/bin/bash
#
# Add latency to all outgoing traffic on $DEV on tcp/udp $PORT,
# in the amount of $DELAY.
#
# This is matching on both source port and destination port, which
# may hit you twice if you're accessing a local resource.
#
# To see what's currently in effect,
# tc -s qdisc show dev lo
@nathan-muir
nathan-muir / routes.js
Created February 17, 2016 02:06 — forked from dearlordylord/routes.js
Iron Router error
var A = RouteController.extend({
onBeforeAction: function() {
console.warn('A');
this.next();
}
});
var B = A.extend({
onBeforeAction: function() {
console.warn('B');
this.next();