Skip to content

Instantly share code, notes, and snippets.

View ept's full-sized avatar

Martin Kleppmann ept

View GitHub Profile

TRVE DATA monthly update: May 2016

Hi everyone, the month of May has flown by, and it's time for our second monthly update for the TRVE DATA project.

In case you missed it, last month's update is here: https://gist.github.com/ept/627b4f102a0a036cee0b941a8b8e31c2

Here's what's new in May:

  • Stephan has been doing some measurements to determine the overhead of running a Tor hidden service on a smartphone, which could be used to exchange messages between devices directly in a privacy-preserving way. He found that just keeping the hidden service alive produces several hundreds of megabytes per month in traffic. To a large extent this seems to be caused by regularly downloading information about the status of all Tor relays. As this amount of overhead is not acceptable for many users with a limited data allowance, an open question is whether we can reduce the amount of data that needs to be downloaded, and what the trade-offs are.
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
ept / trve-2016-04.md
Created April 29, 2016 15:26
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:

@ept
ept / ipbill.md
Last active March 15, 2016 12:04

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
ept / gist:8464174
Created January 16, 2014 21:54
25 second RTT
$ ping google.com
PING google.com (173.194.34.104): 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 173.194.34.104: icmp_seq=0 ttl=47 time=5277.419 ms
64 bytes from 173.194.34.104: icmp_seq=1 ttl=47 time=5967.947 ms
Request timeout for icmp_seq 7
@ept
ept / gist:3091205
Created July 11, 2012 15:36
Minimal shell script for launching Zookeeper
#!/bin/bash -e
export JAVA_HOME="/usr/lib/jvm/java-6-openjdk-amd64"
export ZOOBINDIR="/home/zookeeper/current/bin"
export JMXFLAGS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false"
export ZOOMAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain"
export ZOOCFGDIR="/home/zookeeper/config"
export ZOO_LOG_DIR="/home/zookeeper/log"
export ZOO_LOG4J_PROP="INFO,ROLLINGFILE"
. $ZOOBINDIR/zkEnv.sh
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
-----------------
module RegexTest
LAMBDAS = {
:one => lambda{|str| str[/(\w+)/, 1] },
:two => lambda{ puts "$1 = #{$1}" }
}
end
RegexTest::LAMBDAS[:one].call('foo')
# => "foo"
RegexTest::LAMBDAS[:two].call
@ept
ept / gist:2920086
Created June 12, 2012 20:56
Ratio of mean to median household income, by country (2004)
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
ept / gist:2838935
Created May 30, 2012 20:57
Make Storm use exec instead of forking a child for the JVM (patch for 0.7.1 release)
--- 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