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

Keybase proof

I hereby claim:

  • I am ept on github.
  • I am martinkl ( on keybase.
  • I have a public key whose fingerprint is 4DF9 7732 6AF8 33A8 21AF E443 ED78 F8F5 352D 8EDF

To claim this, I am signing this object:

View nullmsg.c
#include <librdkafka/rdkafka.h>
#include <string.h>
#include <stdio.h>
/* If this is zero, the message is produced correctly. Other values cause problems. */
#define ERROR_LEN 512
#define TOPIC "foo"
#define MSG_KEY "hello"
View gist:84014
--- jquery-1.3.2.js 2009-03-23 23:40:44.000000000 +0000
+++ /tmp/jquery-1.3.2.js 2009-03-24 09:14:16.000000000 +0000
@@ -3262,7 +3262,7 @@
data: params,
complete: function(res, status){
// If successful, inject the HTML into all the matched elements
- if ( status == "success" || status == "notmodified" )
+ if ( dUmMy== "success" || dUmMy== "notmodified" )
// See if a selector was specified
self.html( selector ?
View gist:95762
$ newgem .
create doc
create lib
$ script/generate component_generator mygen rails
create rails_generators/mygen/templates
exists test
create rails_generators/mygen/mygen_generator.rb
View gist:141346
Consuming example queue...
Exception in thread "main" com.rabbitmq.client.ShutdownSignalException: connection error; reason:
at com.rabbitmq.client.impl.AMQConnection.shutdown(
at com.rabbitmq.client.impl.AMQConnection$
Caused by:
at Source)
at com.rabbitmq.client.impl.Frame.readFrom(
at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(
at com.rabbitmq.client.impl.AMQConnection.readFrame(
at com.rabbitmq.client.impl.AMQConnection$
View gist:147625
import java.util.logging.Logger
import com.rabbitmq.client.{AlreadyClosedException, Channel, Connection, ConnectionFactory,
ConnectionParameters, QueueingConsumer, ShutdownSignalException, AMQP}
object RabbitExample {
case class Config(host: String, port: Int)
val config = Config("localhost", 5672)
private val log = Logger.getLogger(this.getClass.getName)
private var connectionFactory: ConnectionFactory = null
View gist:1124644
class BridgeController < ApplicationController
rescue_from YouShallNotPassException, :status => 403, :error_code => 'no_way' do |exception, response|
response[:where] = exception.backtrace.first
# Assuming a route like this:
# map.connect "/khazad_dum/bridge/cross", :controller => :bridge, :action => :cross, :format => :json
# then this will return a HTTP 403 error with the following JSON object as body:
# {"error_code": "no_way", "message": "No balrogs past this point please",
# "where": "bridge_controller.rb:12:in `cross'"}
ept / failure
Created Aug 11, 2011
Exceptions in Neo4j.rb (1.1.4)
View failure
jruby-1.6.3 :001 > require 'rubygems'
=> true
jruby-1.6.3 :002 > require 'neo4j'
=> true
jruby-1.6.3 :003 > inserter =
=> #<Neo4j::Batch::Inserter:0xd713fe @rule_inserter=#<Neo4j::Batch::RuleInserter:0x4936f3 @inserter=#<Neo4j::Batch::Inserter:0xd713fe ...>>, @batch_inserter=#<Java::OrgNeo4jKernelImplBatchinsert::BatchInserterImpl:0x118abfe>>
jruby-1.6.3 :004 > node_a = inserter.create_node('name' => 'andreas')
=> 1
jruby-1.6.3 :005 > node_c = inserter.create_node('name' => 'craig')
=> 2
ept / qrupdate.log
Created Aug 28, 2011
brew install qrupdate
View qrupdate.log
==> Downloading
File already downloaded in /Users/martin/Library/Caches/Homebrew
/usr/bin/tar xf /Users/martin/Library/Caches/Homebrew/qrupdate-1.1.1.tar.gz
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> make -j 1 install
make -j 1 install
/usr/local/bin/gfortran -O3 -march=core2 -msse4.1 -w -pipe -fPIC -c caxcpy.f
/usr/local/bin/gfortran -O3 -march=core2 -msse4.1 -w -pipe -fPIC -c cch1dn.f
/usr/local/bin/gfortran -O3 -march=core2 -msse4.1 -w -pipe -fPIC -c cch1up.f
View Podfile
platform :ios
dependency 'JSONKit'
dependency 'ASIHTTPRequest'
You can’t perform that action at this time.