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
#!/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..." |
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
#!/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 |
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
<head> | |
<title>test-non-reactive-sort-1</title> | |
</head> | |
<body> | |
{{> nonReactiveSort}} | |
</body> | |
<template name="nonReactiveSort"> | |
Page: <a href="#" data-action="page" data-n="-1">Prev</a> | <a href="#" data-action="page" data-n="1">Next</a> |
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
<head> | |
<title>test-non-reactive-sort-2</title> | |
</head> | |
<body> | |
{{> nonReactiveSort}} | |
</body> | |
<template name="nonReactiveSort"> | |
Page: <a href="#" data-action="page" data-n="-1">Prev</a> | <a href="#" data-action="page" data-n="1">Next</a> |
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
openssl req -x509 -nodes -newkey rsa:2048 -keyout key.pem -out cert.pem -days 5000 |
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
IP_ADDRESS_REGEX = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/ | |
CIDR_ADDRESS_REGEX = /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\/(\d{1,2})$/ | |
class @Inet | |
constructor: (ipAddress)-> | |
if typeof ipAddress == 'number' |
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
mongod --smallfiles --dbpath /path/to/my/app/.meteor/local/db --port 3001 |
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
ssh-keygen -p -f $1 | |
ssh-add $1 |
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
connect = function connect(observeable, ...selectors) { | |
return function (ChildComponent) { | |
const childDisplayName = | |
ChildComponent.displayName || | |
ChildComponent.name || | |
'ChildComponent'; | |
return React.createClass({ | |
displayName: `ConnectedObserver(${childDisplayName})`, |
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
var A = RouteController.extend({ | |
onBeforeAction: function() { | |
console.warn('A'); | |
this.next(); | |
} | |
}); | |
var B = A.extend({ | |
onBeforeAction: function() { | |
console.warn('B'); | |
this.next(); |
OlderNewer