Skip to content

Instantly share code, notes, and snippets.

@cmonkey
cmonkey / gist:1237222
Created September 23, 2011 12:30
man memcached
man -M $MEMCACHED_HOME/share/man memcached
@cmonkey
cmonkey / goagent
Created October 5, 2011 16:13
gfw goagent
python proxy.py
@cmonkey
cmonkey / gist:1264877
Created October 5, 2011 16:16
simple httpserver
python3 -m http.server
@cmonkey
cmonkey / gist:1324494
Created October 29, 2011 14:12
yaourt -Syua error
error: failed to commit transaction (conflicting files)
initscripts: /etc/profile.d/locale.sh exists in filesystem
Errors occurred, no packages were upgraded.
sudo mv /etc/profile.d/locale.sh{,-backup}
yaourt -Syua
#lang racket
(*
(+
(*)
(*
(+
(*)
(*)
(*)
(*)
@cmonkey
cmonkey / eq.rkt
Created October 22, 2014 09:17
eq string
racket@> (= "str" "str")
2|=: contract violation
3| expected: number?
4| given: "str"
5| argument position: 1st
6| other arguments...:
7| "str"
8| context...:
9| /usr/share/racket/collects/racket/private/misc.rkt:87:7
Name Status Libre Alternatives Description
android-sdk-platform-tools nonfree
cowsay nonfree cowsay website of the source code is unavaiable
dropbox nonfree proprietary EULA, built from binaries, unavailable sources, non-free artwork
faac nonfree [FIXME:description] is a GPL'ed package, but has non free code that can't be distributed under the GPL
flashplugin nonfree nonfree, nondistributable, built from binary installers, etc
intel-ucode nonfree no modification, use restrictions
jdk7 nonfree
opencl-nvidia nonfree nonfree, nondistributable, built from binary installers, etc
#lang racket
(require json)
(define filename "combined.json")
(define timezone-data (call-with-input-file filename read-json))
(define (random-sample object [max-size 5])
(cond
((hash? object)

I've been working with Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

#lang typed/racket
(require x64asm)
(define-cast ->int
#:type (-> Integer)
#:ctype (_fun -> _int))
(define-λ! get-1000 ->int
(mov rax (imm32 1000))
(ret))