Skip to content

Instantly share code, notes, and snippets.

Martin Kühl mkhl

View GitHub Profile
mkhl / acme-editorconfig
Created Apr 1, 2019
EditorConfig support for Acme
View acme-editorconfig
. 9.rc
. $PLAN9/lib/acme.rc
fn convert {
awk -F'=' '
$1 == "indent_style" {
print "Spaces", ($2 == "space") ? "on" : "off"
mkhl / acme-autoformat
Last active Apr 1, 2019
My current autoacme event handler script
View acme-autoformat
. 9.rc
. $PLAN9/lib/acme.rc
fn hashbang {
awk '
mkhl /
Created May 16, 2018
Acme auto commands - like acmego, but generic

The specific profile doesn’t actually matter!

Take any dark profile (both Pastel and Tango are great!) and change the background to #292929 (the colour of the dark iTerm title bar). I also like to activate Cursor Guide and use a translucent greyish colour.

iTerm Settings

mkhl /
Last active Nov 2, 2017 — forked from FND/
complate-wsgi sandbox
$ python3 -m venv venv
$ . venv/bin/activate

$ pip install js2py gunicorn

$ gunicorn app:app


mkhl /
Created Nov 2, 2017
Tail-recursive Tree fold using CPS

Tail-recursive Tree fold

Both the original and the proposed solution assume an associative and commutative combining function (g).

That bugged me so a colleague and I put this together.


Keybase proof

I hereby claim:

  • I am mkhl on github.
  • I am mkhl ( on keybase.
  • I have a public key ASDOZDDY2WKJiu0GMeVXecOv_KalOkFnJhahWX-vYhWcAAo

To claim this, I am signing this object:

View snippets.cson
# Demonstration for
# Expand this snippet, type "foo" for the first placeholder, hit <Tab>
'Test: Adjacent Tabstops':
'prefix': 'a'
'body': '${1:abc}${2:def}'
View nsfw-temp.patch
From d3180baace023233e9fff2d049bcd7beb143f853 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20K=C3=BChl?= <>
Date: Thu, 31 Mar 2016 19:20:00 +0200
Subject: [PATCH] Test operation with path inside `$TMPDIR`
js/spec/index-spec.js | 3 ++-
package.json | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
mkhl / t
Created Mar 16, 2016
“switch” files interactively
View t
function list {
if git rev-parse &>/dev/null; then
git ls-files
find . -type f | cut -c 3-
You can’t perform that action at this time.