Skip to content

Instantly share code, notes, and snippets.

reinh /
Last active Feb 25, 2020
Resilience Engineering quotes

Resilience Engineering quotes

Collected by @reinh.

The Safety Anarchist by Sidney Dekker

Dekker, S. (2017). The Safety Anarchist: Relying on Human Expertise and Innovation, Reducing Bureaucracy and Compliance. United Kingdom: CRC Press.

reinh / set-window-title.zsh
Created Feb 24, 2020
Set iTerm2 window title to relative PWD (~/foo)
View set-window-title.zsh
function set-window-title {
echo -ne "\e]1;$(dirs)\a"
add-zsh-hook precmd set-window-title
reinh / apology.
Created Oct 22, 2019 — forked from unclebob/apology.
Apology to Women Programmers. [Originally by Robert Martin, saved here for posterity by @reinh]
View apology.
Today I gave a keynote at ACCU in Oxford. In the midst of it I made two (count them) two statements that I should have known better than to make. I was describing the late '70s, and the way we felt about the C language at the time. My slide said something like: "C was for real men." Emily Bache, whom I know and hold in high regard, spoke up and said "What about women?". And I said something like: "We didn't allow women in those days." It was a dumb crack, and should either not have been said, or should have been followed up with a statement to the effect that that was wrong headed.
The second mistake I made was while describing Cobol. I mentioned Adm. Grace Hopper. I said something like "May she rest in peace." I don't know that any of the words were actually demeaning, but the tone was not as respectful as it should have been to an Admiral in the United State Navy, and one who was so instrumental in our industry; despite what I feel about Cobol.
I am a 59 year old programmer who was brought up
View gist:ff21690d165b31dad64b9d45f3d73d11
I Am Me
In all the world, there is no one else exactly like me
Everything that comes out of me is authentically me
Because I alone chose it – I own everything about me
My body, my feelings, my mouth, my voice, all my actions,
Whether they be to others or to myself – I own my fantasies,
My dreams, my hopes, my fears – I own all my triumphs and
Successes, all my failures and mistakes Because I own all of
Me, I can become intimately acquainted with me – by so doing
View roll.zsh
# roll 2d6+3
function roll {
local match total
local -a rolls
if ! [[ "$1" =~ '([0-9]+)d([0-9]+)(\+[0-9]+)?' ]]; then
echo "usage: roll 2d6+3" 1>&2
return 1
View lambda_tricks.rb
class Proc
%i[! ~].each do |op|
define_method(op) { ->(x) { call(x).send(op)} }
%i[+ - * / ^ & |].each do |op|
define_method(op) { |other| ->(x) { call(x).send op, } }
View Collate.hs
-- Collation of infinite streams. I guess.
module Collate where
import Prelude hiding (take, zip, repeat, head, tail)
import qualified Data.List as List
infixr 5 :<
-- An infinite stream of values
data Stream a = a :< Stream a

Keybase proof

I hereby claim:

  • I am reinh on github.
  • I am reinh ( on keybase.
  • I have a public key whose fingerprint is 47C0 8838 CF46 96A1 2B5C 4E06 B2A1 232F F98C AB84

To claim this, I am signing this object:

View gist:fb54d372e8405482571e5a1af8b3ee76
$ idris --install ncurses.ipkg
Entering directory `./src'
/Applications/ -C Ncurses
make[1]: `ncurses_extra.o' is up to date.
Leaving directory `./src'
Entering directory `./src'
Installing ncurses_extra.o to /usr/local/Cellar/idris/1.0/share/x86_64-osx-ghc-8.0.2/idris-1.0/libs/ncurses/
Uncaught error: ncurses_extra.o: copyFile:atomicCopyFileContents:withReplacementFile:copyFileToHandle:openBinaryFile: does not exist (No such file or directory)
View agda-comment-region.el
(defun agda/comment-in ()
(search-backward "{-+}")
(forward-char 4)
(backward-delete-char 2)
(insert-string "(-}")
(search-forward "{+-}")
(backward-delete-char 3)
(insert-string "-)-}")