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
scala> case class C(a: String, b: Option[String]) | |
defined class C | |
scala> val constructors = C("",None).getClass.getConstructors | |
constructors: Array[java.lang.reflect.Constructor[_]] = Array(public C(java.lang.String,scala.Option)) | |
scala> constructors.length | |
res13: Int = 1 | |
scala> constructors(0).getParameterTypes |
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
sudo ipfw pipe 1 config bw 150kbit/s delay 150ms | |
sudo ipfw add pipe 1 dst-ip 0.0.0.0/0 | |
# do slow stuff | |
# done: | |
sudo ipfw flush |
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
#!/usr/bin/env python | |
import json | |
import urllib | |
import sys | |
if len(sys.argv) < 2: | |
sys.exit('Usage: %s [Tweet ID #]' % sys.argv[0]) | |
url = "http://api.twitter.com/1/statuses/show/%s.json" % sys.argv[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
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
! THIS SERVICE HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW IF IT ! | |
! DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE LETTING ! | |
! YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH DEPENDENCY OF ! | |
! YOUR SERVICE WHICH FULLY (BUT LIGHTLY) TESTS YOUR SERVICE'S ABILITY TO ! | |
! USE THAT SERVICE. THINK OF IT AS A CONTINUOUS INTEGRATION TEST. ! | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
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
The EC2 and EBS APIs are implemented on multi-Availability Zone | |
replicated datastores. These datastores are used to store | |
metadata for resources such as instances, volumes, and | |
snapshots. To protect against datastore corruption, currently | |
when the primary copy loses power, the system automatically flips | |
to a read-only mode in the other Availability Zones until power | |
is restored to the affected Availability Zone or until we | |
determine it is safe to promote another copy to primary. We are | |
addressing the sources of blockage which forced manual assessment | |
and required hand-managed failover for the control plane, and |
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
curl http://api.twitter.com/1/statuses/show/240219598270640128.json | python -m json.tool |
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
"We know about as much about software quality problems as they knew about the Black Plague | |
in the 1600s. We've seen the victims' agonies and helped burn the corpses. We don't know | |
what causes it; we don't really know if there is only one disease. We just suffer -- and | |
keep pouring our sewage into our water supply." | |
Tom Van Vleck |
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 | |
if [ "$#" -lt 1 ]; then | |
echo "enter name to grep" | |
exit 1 | |
fi | |
files=`find . -name "*jar"` | |
for file in $files ; do echo "----------"; echo $file; jar tvf $file | grep $@ ; done |
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
cd /home/tim/VirtualBox\ VMs/ | |
mv proxydev2_1351794515 tmp | |
mkdir proxydev2_1351794515 | |
sudo mount -t tmpfs -o size=10G tmpfs /home/tim/VirtualBox\ VMs/proxydev2_1351794515 | |
cp -a tmp/* proxydev2_1351794515/ | |
# go back to vagrant directory and `vagrant up` |
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
In science it often happens that scientists say, "You know that's a really good | |
argument; my position is mistaken," and then they would actually change their | |
minds and you never hear that old view from them again. They really do it. It | |
doesn't happen as often as it should, because scientists are human and change is | |
sometimes painful. But it happens every day. I cannot recall the last time | |
something like that happened in politics or religion. | |
Carl Sagan |