Skip to content

Instantly share code, notes, and snippets.

Martin Ek ekmartin

Block or report user

Report or block ekmartin

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
View dump_post_change
--------------------------------------------------------------------------------
Command: ../target/release/rocksdb-leak
Massif arguments: (none)
ms_print arguments: massif.out.19820
--------------------------------------------------------------------------------
MB
15.40^ : : ::@@ :: : : :@:: @ ::
| ::::#:::::::::::::@ :@:::::::::::::@::@::@:::@::@::@
View dump_pre_change
--------------------------------------------------------------------------------
Command: ../target/release/rocksdb-leak
Massif arguments: (none)
ms_print arguments: massif.out.18531
--------------------------------------------------------------------------------
MB
23.66^ :
| :@:@:@::@:#
View heap_test.rs
extern crate rocksdb;
use rocksdb::{DB, Options, SliceTransform};
use std::alloc::System;
#[global_allocator]
static A: System = System;
fn main() {
View keybase.md

Keybase proof

I hereby claim:

  • I am ekmartin on github.
  • I am ekmartin (https://keybase.io/ekmartin) on keybase.
  • I have a public key whose fingerprint is 5D13 1373 29A7 EA82 EACE D2B0 4A29 0DD0 6E58 CCDD

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am ekmartin on github.
  • I am ekmartin (https://keybase.io/ekmartin) on keybase.
  • I have a public key whose fingerprint is 93E2 0D7F B3CE 001A 5448 07D1 44FF B185 0D89 89FE

To claim this, I am signing this object:

@ekmartin
ekmartin / slack-irc
Created Apr 29, 2015
slack-irc init.d service
View slack-irc
#!/bin/bash
NAME=slack-irc
NODE_BIN_DIR=/usr/bin
NODE_PATH=/usr/lib/node_modules
APPLICATION_DIRECTORY=/home/slack-irc/slack-irc
APPLICATION_START=$APPLICATION_DIRECTORY/index.js
PIDFILE=$APPLICATION_DIRECTORY/pids/$NAME.pid
LOGFILE=$APPLICATION_DIRECTORY/logs/production.log
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gruppe27.fellesprosjekt</groupId>
<artifactId>fellesprosjekt27</artifactId>
<version>0.1.0</version>
<packaging>jar</packaging>
<name>fellesprosjekt27</name>
View votemapping.js
var voteMappingSchema = new Schema({
user: {
type: Schema.Types.ObjectId,
ref: 'User'
},
hasVoted: {
type: Boolean,
default: false
}
});
@ekmartin
ekmartin / clear-collections.js
Created Feb 14, 2015
clearCollections Mongoose
View clear-collections.js
function clearCollections() {
var collections = _.values(mongoose.connection.collections);
return Bluebird.map(collections, function(collection) {
return collection.removeAsync();
});
}
before(function(done) {
mongoose.connection.on('connected', done);
});
View gist:e785bea5de2e5d606cda
diff --git a/lego/users/migrations/0001_initial.py b/lego/users/migrations/0001_initial.py
index f33ef4a..d206f67 100644
--- a/lego/users/migrations/0001_initial.py
+++ b/lego/users/migrations/0001_initial.py
@@ -3,9 +3,9 @@ from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
+import django.core.validators
import django.utils.timezone
You can’t perform that action at this time.