Skip to content

Instantly share code, notes, and snippets.

@MichaelBlume
MichaelBlume / bf.l
Created October 11, 2020 23:09
Brainfuck interpreter in lambda calculus
((fn [truth] ((fn [falsehood] ((fn [and] ((fn [Y] ((fn [pair] ((fn [null] ((fn [null?] ((fn [car] ((fn [cdr] ((fn [mapp] ((fn [repeat-forever] ((fn [zero] ((fn [inc] ((fn [zero?] ((fn [dec] ((fn [an*] ((fn [equals] ((fn [get-nth] ((fn [tape] ((fn [read-tape] ((fn [apply-tape] ((fn [write-tape] ((fn [left-tape] ((fn [right-tape] ((fn [inc-tape] ((fn [dec-tape] ((fn [blank-tape] ((fn [parse-state] ((fn [get-parse-instructions] ((fn [set-parse-instructions] ((fn [alter-parse-instructions] ((fn [get-loop-stack] ((fn [set-loop-stack] ((fn [alter-loop-stack] ((fn [get-pairs] ((fn [set-pairs] ((fn [alter-pairs] ((fn [get-parse-counter] ((fn [set-parse-counter] ((fn [alter-parse-counter] ((fn [lshift] ((fn [lshift?] ((fn [rshift] ((fn [rshift?] ((fn [plus] ((fn [plus?] ((fn [minus] ((fn [minus?] ((fn [lbrace] ((fn [lbrace?] ((fn [rbrace] ((fn [rbrace?] ((fn [read] ((fn [read?] ((fn [write] ((fn [write?] ((fn [parse-stepper] ((fn [do-parse-state] ((fn [look-in-pairs] ((fn [make-jump-table] ((fn [brainfuck-state] ((fn
@MichaelBlume
MichaelBlume / gitconfig
Created April 12, 2011 17:51
my git config file
[advice]
# I know this stuff by now
pushNonFastForward = false
statusHints = false
[alias]
a = add
ai = add --interactive
ap = add --patch
b = branch
bl = blame
0 info it worked if it ends with ok
1 verbose cli [ '/home/mike/node-v6.10.3-linux-x64/bin/node',
1 verbose cli '/home/mike/node-v6.10.3-linux-x64/bin/npm',
1 verbose cli 'run',
1 verbose cli 'prepack',
1 verbose cli '/home/mike/workspace/freecell-web/resources/public/js/compiled/app.js' ]
2 info using npm@3.10.10
3 info using node@v6.10.3
4 verbose run-script [ 'prepack' ]
5 info lifecycle prepack@0.2.1-alpha.0~prepack: prepack@0.2.1-alpha.0
I got a new phone on May 1 2017.
As of that date, either the first, or the second half of your Signal 'safety number' with me should be:
21454 16624 48675 91604 68231 31181
All future messages of this nature will be dated. Undated messages should be considered obsolete.
-----BEGIN PGP MESSAGE-----
Comment: https://keybase.io/verify
Version: Keybase Go 1.0.21 (linux)
@MichaelBlume
MichaelBlume / gist:ebf2cd75536c612eace9
Last active February 28, 2017 03:59
git testscript
echo "somebody should really delete this build"
echo "please"
echo "I keep getting messages when it fails and I can't delete it"
echo "I was the one maintaining it and I'm not there anymore, so there's not much point in it"
exit 0
@MichaelBlume
MichaelBlume / gist:a8ae240eab8006d9f931
Last active February 24, 2017 06:31
bisect-script
echo "someone should really delete this build"
echo "there's not much point in it without me there to maintain it"
echo "I can't delete it anymore I don't have access"
echo "and it keeps e-mailing me whenever it breaks"
echo "I mean I guess I could alter this gist and make it delete itself but that sounds hard"
exit 0
Either the first, or the second half of your Signal 'safety number' with me should be 09763 77527 25829 06828 55157 79754
-----BEGIN PGP MESSAGE-----
Comment: https://keybase.io/verify
Version: Keybase Go 1.0.18 (linux)
xA0DAAoBmlwTpz2Jb7YBy+F0AOIAAAAA5kVpdGhlciB0aGUgZmlyc3QsIG9yIHRo
ZSBzZWNvbmQgaGFsZiBvZiB5b3VyIFNpZ25hbCAnc2FmZXR5IG51bWLlZXInIHdp
dGggbWUgc2hvdWxkIGJlIDA5NzYzIDc3NTLkNyAyNTgyOSAwNjgyOCA1NeMxNTcg
Nzk3NeA0AMLBXAQAAQoAEAUCWJf2ZAkQmlwTpz2Jb7YAAB4nEABkEqAxxavykVQ/
zg9HBf99TVfd2wcCfilyhjsWVgRKItvN3J8V6DhIZNTtm5xfFXkG4yIJ5c41h3on
@MichaelBlume
MichaelBlume / Keybase proof
Created August 16, 2016 00:23
keybase proof
### Keybase proof
I hereby claim:
* I am michaelblume on github.
* I am michaelblume (https://keybase.io/michaelblume) on keybase.
* I have a public key ASClN_P6H_VqzfqR0CGMS6P1XHAmRobwvIGcY5G6yCgwLQo
To claim this, I am signing this object:
From 06a22bd44719b1753d522be0618b4c49c0c39642 Mon Sep 17 00:00:00 2001
From: Michael Blume <blume.mike@gmail.com>
Date: Fri, 12 Aug 2016 16:45:19 -0700
Subject: [PATCH] make submit work with octave 4.0
---
lib/jsonlab/loadjson.m | 4 ++--
lib/makeValidFieldName.m | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
@MichaelBlume
MichaelBlume / textsecure_cutoff.clj
Created March 24, 2016 21:13
drops all messages older than some date from a textsecure backup
(def cutoff
(clj-time.coerce/to-long
(clj-time.core/date-time 2015 4 3 5 54)))
(with-open [input (java.io.FileInputStream.
"/Users/michael.blume/TextSecurePlaintextBackup.xml")
output (java.io.FileWriter.
"/Users/michael.blume/betterbackup.xml")]
(-> input
clojure.data.xml/parse