Skip to content

Instantly share code, notes, and snippets.

Martin Kleppmann ept

Block or report user

Report or block ept

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
awk '{print $7}' access.log | # Split by whitespace, 7th field is request path
sort | # Make occurrences of the same URL appear consecutively in file
uniq -c | # Replace consecutive occurrences of the same URL with a count
sort -rn | # Sort by number of occurrences, descending
head -n 5 # Output top 5 URLs
ept /
Created Apr 29, 2016
TRVE DATA monthly update: April 2016

This is a copy of an email sent to the TRVE DATA mailing list.

TRVE DATA monthly update: April 2016

Hi everyone, thanks for subscribing to the TRVE DATA mailing list! We're going to try to build a habit of posting a monthly project update here, and this is the first one.

For background, we published a blog post explaining the rationale and goals of the TRVE project. And here's a little video showing our collaborative text editor prototype.

Today I'd like to briefly introduce the people in Cambridge who are working on various aspects of TRVE:


Investigatory Powers Bill

Please email your MP

The UK government is currently trying to rush the so-called "Investigatory Powers Bill" [1] through parliament (the bill has its second reading today — 15 March 2016). The bill gives the police, intelligence services and various government agencies wide-ranging powers to collect the internet activity of everybody in the country, hack innocent people's devices in bulk, compel companies to hack their own customers [2], and collect intrusive databases of personal data on innocent people.

It is doubtful whether these powers would make us any safer [3]; but they would make the UK a police state, with a regime of mass surveillance on par with Russia or China. As one MP put it: “Because for the past 200 years we haven’t had a Stasi or a Gestapo, we are intellectually lazy about it [4].” 200 senior lawyers and barristers have called the bill “unfit for purpose” and “maybe illegal” [5]. The current Apple vs. FBI case in th

ept / gist:8464174
Created Jan 16, 2014
25 second RTT
View gist:8464174
$ ping
PING ( 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
64 bytes from icmp_seq=0 ttl=47 time=5277.419 ms
64 bytes from icmp_seq=1 ttl=47 time=5967.947 ms
Request timeout for icmp_seq 7
ept / gist:3091205
Created Jul 11, 2012
Minimal shell script for launching Zookeeper
View gist:3091205
#!/bin/bash -e
export JAVA_HOME="/usr/lib/jvm/java-6-openjdk-amd64"
export ZOOBINDIR="/home/zookeeper/current/bin"
export JMXFLAGS=""
export ZOOMAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain"
export ZOOCFGDIR="/home/zookeeper/config"
export ZOO_LOG_DIR="/home/zookeeper/log"
View gist:3056389
Giveaway of old computing equipment! Everything still works, as far as I know.
If you want anything, let me know ASAP (@martinkl on Twitter), otherwise
it's going for recycling. You can pick it up in Kingston upon Thames
(south-west London). Everything free, the sooner it's gone the better.
Desktop computers
View lambda_binding.rb
module RegexTest
:one => lambda{|str| str[/(\w+)/, 1] },
:two => lambda{ puts "$1 = #{$1}" }
# => "foo"
ept / gist:2920086
Created Jun 12, 2012
Ratio of mean to median household income, by country (2004)
View gist:2920086
Ratio of mean to median household income, by country (2004)
Country Mean Median Currency Mean greater by
United Kingdom 16,685 13,637 British Pound 22.4%
United States 32,195 26,672 United States Dollar 20.7%
Italy 15,835 13,367 Euro 18.5%
Poland 14,844 12,697 Polish złoty 16.9%
Australia 29,417 25,581 Australian Dollar 15.0%
Canada 33,785 29,394 Canadian Dollar 14.9%
ept / gist:2838935
Created May 30, 2012
Make Storm use exec instead of forking a child for the JVM (patch for 0.7.1 release)
View gist:2838935
--- a/bin/storm 2012-05-30 19:57:54.265944289 +0000
+++ b/bin/storm 2012-05-30 20:36:25.516040172 +0000
@@ -82,12 +82,15 @@
print name + ": " + confvalue(name, [STORM_DIR + "/conf"])
-def exec_storm_class(klass, jvmtype="-server", childopts="", extrajars=[], args=[]):
- nativepath = confvalue("java.library.path", extrajars)
- args_str = " ".join(map(lambda s: "\"" + s + "\"", args))
- command = "java " + jvmtype + " -Dstorm.home=" + STORM_DIR + " " + get_config_opts() + " -Djava.library.path=" + nativepath + " " + childopts + " -cp " + get_classpath(extrajars) + " " + klass + " " + args_str
ept /
Last active Sep 30, 2015
References from my talk “Transactions: Myths, Surprises and Opportunities”

Transactions: Myths, Surprises and Opportunities


  1. Atul Adya: “Weak Consistency: A Generalized Theory and Optimistic Implementations for Distributed Transactions,” PhD thesis, Massachusetts Institute of Technology, Cambridge, MA, USA, March 1999.
  2. Hagit Attiya, Faith Ellen, and Adam Morrison: “Limitations of Highly-Available Eventually-Consistent Data Stores,” at ACM Symposium on Principles of Distributed Computing (PODC), July 2015.
  3. Peter Bailis, Alan Fekete, Ali Ghodsi, Joseph M Hellerstein, and Ion Stoica: “HAT, not CAP: Towards Highly Available Transactions,” at 14th USENIX Workshop on Hot Topics in Operating Systems (HotOS), May 2013.
  4. Peter Bailis, Ali Ghodsi, Joseph M Hellerstein, and Ion Stoica: “[Bolt-on Causal Consistency](
You can’t perform that action at this time.