Skip to content

Instantly share code, notes, and snippets.


Charl Matthee charl

View GitHub Profile
charl / main.go
Created Nov 12, 2014
go-sql-driver/mysql stalls on locked table access
View main.go
package main
import (
_ ""
charl / gist:c7cdc4f08aeec05e8eea
Created Aug 7, 2014
Etcd upstart script for process control
View gist:c7cdc4f08aeec05e8eea
description "A highly-available key value store for shared configuration and service discovery"
author "Charl Matthee <>"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
charl / ssdb.conf
Created Aug 7, 2014
SSDB upstart script for process management under Ubuntu
View ssdb.conf
description "SSDB - A fast NoSQL database alternative to Redis"
author "Charl Matthee <>"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
charl / Script output
Created Feb 12, 2013
Encoding::UndefinedConversionError: "\xE3" from ASCII-8BIT to UTF-8
View Script output
$ jruby ./test.rb
Native: {"created_at"=>"Mon Feb 11 16:33:45 +0000 2013", "id"=>301006116974915600, "id_str"=>"301006116974915586", "text"=>"やっとここまできた: ひとりでやるRiak Advent Calendar 2012 day14 - Haskell Client - kuenishi's blog -", "source"=>"<a href=\"\" rel=\"nofollow\">YoruFukurou</a>", "truncated"=>false, "in_reply_to_status_id"=>nil, "in_reply_to_status_id_str"=>nil, "in_reply_to_user_id"=>nil, "in_reply_to_user_id_str"=>nil, "in_reply_to_screen_name"=>nil, "user"=>{"id"=>5576192, "id_str"=>"5576192", "name"=>"UENISHI Kota", "screen_name"=>"kuenishi", "location"=>"Tokyo, Japan", "description"=>"Just got senior: these tweets are my own; forever. WishList", "url"=>"", "entities"=>{"url"=>{"urls"=>[{"url"=>"", "expanded_url"=>nil, "indices"=>[0, 27]}]}, "description"=>{"urls"=>[{"url"=>"http://
charl / gist:4500622
Created Jan 10, 2013
What is the most efficient way to filter documents with a similar structure to the one below based on the 'expanded_url' key's value. There are two more general questions here: * How do you filter documents based on a nested key(s)? * How do you filter documents based on the value of a key that resolves to an array of objects?
View gist:4500622
"created_at": "Tue, 01 Jan 2013 12:55:09 +0000",
"entities": {
"hashtags": [{
"text": "Clojure",
"indices": [39, 47]
"urls": [{
"url": "",
"expanded_url": "",
charl / gist:1473622
Created Dec 13, 2011
OS X Lion HardwareGrowler crashes when woken up
View gist:1473622
Process: HardwareGrowler [258]
Path: /Applications/
Identifier: com.growl.hardwaregrowler
Version: 1.2.2 (1.2.2)
Code Type: X86-64 (Native)
Parent Process: launchd [205]
Date/Time: 2011-12-14 06:36:19.967 +1100
OS Version: Mac OS X 10.7.2 (11C74)
You can’t perform that action at this time.