Skip to content

Instantly share code, notes, and snippets.

View terkhorn's full-sized avatar

Felix Terkhorn terkhorn

View GitHub Profile
$ bin/riak console
Exec: /home/ubuntu/riak-1.2.1/rel/riak/erts-5.9.1/bin/erlexec -boot /home/ubuntu/riak-1.2.1/rel/riak/releases/1.2.1/riak -embedded -config /home/ubuntu/riak-1.2.1/rel/riak/etc/app.config -pa ./lib/basho-patches -args_file /home/ubuntu/riak-1.2.1/rel/riak/etc/vm.args -- console
Root: /home/ubuntu/riak-1.2.1/rel/riak
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [async-threads:64] [kernel-poll:true]
** ./lib/basho-patches/etop_txt.beam hides /home/ubuntu/riak-1.2.1/rel/riak/lib/observer-1.1/ebin/etop_txt.beam
** /home/ubuntu/riak-1.2.1/rel/riak/lib/observer-1.1/ebin/etop_txt.beam hides /home/ubuntu/riak-1.2.1/rel/riak/lib/basho-patches/etop_txt.beam
** Found 2 name clashes in code paths
13:05:41.651 [info] Application lager started on node 'riak@10.MY.IP.HERE'
13:05:41.796 [info] Upgrading legacy ring
@terkhorn
terkhorn / gist:4033983
Created November 7, 2012 19:55
DateTime to epoch conversions for C#, UTC
using System;
namespace YourChoice
{
public static class TimeHelpers
{
public static DateTime FromEpochTime(this long unixTime)
{
var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
return epoch.AddSeconds(unixTime);
# -*- coding: utf-8 -*-
"""
example use of pandas with oracle mysql postgresql sqlite
- updated 9/18/2012 with better column name handling; couple of bug fixes.
- used ~20 times for various ETL jobs. Mostly MySQL, but some Oracle.
to do:
save/restore index (how to check table existence? just do select count(*)?),
finish odbc,
add booleans?,
(ns express_sample
(:require [cljs.nodejs :as node]))
(def express (node/require "express"))
(def app (. express (createServer)))
(defn -main [& args]
(doto app
(.use (. express (logger)))
(.get "/" (fn [req res]
@terkhorn
terkhorn / run-docker
Last active August 29, 2015 14:08
Simple docker-run script
#!/bin/bash
### USAGE:
### First argument passed to this script is the local volume to mount
### to your docker image. Defaults to "/data".
### ATTENTION OSX USERS!
### IN YOUR .bashrc or .bash_profile, add the following line:
###