This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn read-to-maps [rows] | |
(let [headers (->> | |
rows | |
first | |
(take-while (complement #{""})) | |
(map keyword))] | |
(for [row (rest rows)] | |
(zipmap headers row)))) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute pathogen#infect() | |
let g:paredit_electric_return=0 | |
let g:lisp_rainbow = 1 | |
set nocompatible | |
" create a backup of files when editing in /tmp | |
set backupdir=~/tmp | |
" swap file directory | |
set dir=/tmp | |
set background=dark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn swap-out! [a new-val] | |
(loop [] | |
(let [old-val @a] | |
(if (compare-and-set! a old-val new-val) | |
old-val | |
(recur))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; http://an-animal-imagined-by-poe.tumblr.com/post/97790330928/i-have-been-busy-distracted-absent-for-the-past | |
(defn find-in | |
([needle haystack] (find-in needle haystack 'x)) | |
([needle haystack varname] | |
; varname remminds us of how we got the haystack we're looking at from x | |
(or | |
; base case | |
(when (= needle haystack) | |
varname) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/runhaskell | |
import Data.Char | |
translate_char tmap c = helper tmap where | |
helper [] = c | |
helper ((c',ct):ps) | |
| c == c' = ct | |
| otherwise = helper ps | |
translate_string tmap = map $ translate_char tmap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns schema->gen | |
"Functions for generating test data from schemas." | |
(:require [four.stateful :as four] | |
[re-rand :refer [re-rand]] | |
[schema.core :as sch] | |
[simple-check.generators :as gen])) | |
(defn ^:private re-randify-regex | |
"schema requires ^$ while re-rand forbids them" | |
[re] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n "Updating system so it uses the new JDK..." | |
update-alternatives --quiet --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 2 | |
update-alternatives --quiet --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 2 | |
update-alternatives --quiet --set java /usr/lib/jvm/jdk1.8.0/bin/java | |
update-alternatives --quiet --set javac /usr/lib/jvm/jdk1.8.0/bin/javac | |
echo "done." | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import takewhile, ifilter | |
def fibs(): | |
fib0 = 1 | |
fib1 = 1 | |
while True: | |
yield fib0 | |
newfib = fib0 + fib1 | |
fib0 = fib1 | |
fib1 = newfib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env runhaskell | |
module Main (main) where | |
-- When you copy a conversation out of your google chat logs, it looks like | |
-- this | |
-- | |
-- Alice | |
-- hi | |
-- how are you | |
-- Bob Smith |