Skip to content

Instantly share code, notes, and snippets.

View kisom's full-sized avatar

Kyle Isom kisom

View GitHub Profile
add 0 515969
remove 0
add 0 736404
add 0 180738
get 0
remove 0
add 0 640651
add 1 912519
remove 2
get 0
This file has been truncated, but you can view the full file.
add 0 202064
add 0 309727
get 0
get 1
set 0 from 309727 to 457321
set 1 from 202064 to 229627
set 0 from 457321 to 350553
get 1
add 1 430738
set 0 from 350553 to 958454
This file has been truncated, but you can view the full file.
add 0 202064
add 0 309727
get 0
get 1
set 0 from 309727 to 457321
set 1 from 202064 to 229627
set 0 from 457321 to 350553
get 1
add 1 430738
set 0 from 350553 to 958454
@kisom
kisom / imgur.py
Created December 2, 2011 08:51
imgur album downloader
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# author: kyle isom <coder@kyleisom.net>
# license: isc / public domain dual-license
# see (http://www.brokenlcd.net/standard-license.txt)
#
"""
This is a module (with a main() function) to grab a list of image links in
an imgur album. The main() function demonstrates how to use that to
@kisom
kisom / Makefile
Created August 31, 2017 04:09
preflights in Makefiles
.PHONY: envdir
serve: envdir
$(eval ENVDIR := $(shell ./preflight.sh))
$(ENVDIR) /usr/local/myservice/env python -m SimpleHTTPServer 8000
@kisom
kisom / sha256-test.clj
Created January 29, 2012 10:47
SHA-256 hashing in Clojure via Java interop
;; test suite to go with hashing code
(ns user.test.sha256
(:use [clojure.test]
[clojure.string :only [join]]
[user.hash]))
(def sha256-test-vectors
#^{:doc "test vectors from the NESSIE project (http://is.gd/jdM99e)"}
[{ :message ""
:expected "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}
@kisom
kisom / Purity.lhs
Last active May 31, 2016 13:00
"Why Purity Matters" blog post.
Purity is a useful construct that forces programmers to consider that the
environment that they are operating in is unclean, and this introduces
barriers to formally defining the behaviour of the system comprising
the program and its environment.
This file is a [literate Haskell
file](https://gist.github.com/kisom/3863f17636d99b4f8401) run through
[pandoc](http://johnmacfarlane.net/pandoc/) to produce a Markdown
post. There might be a few glitches as I'm still developing a workflow
in this style.
@kisom
kisom / autobuild.sh
Last active January 29, 2016 23:30
Autotools bootstrap script.
#!/bin/sh
# _ _ _ _ _ _
# __ _ _ _| |_ ___ | |__ _ _(_) | __| | ___| |__
# / _` | | | | __/ _ \| '_ \| | | | | |/ _` | / __| '_ \
# | (_| | |_| | || (_) | |_) | |_| | | | (_| |_\__ \ | | |
# \__,_|\__,_|\__\___/|_.__/ \__,_|_|_|\__,_(_)___/_| |_|
#
#
# https://git.io/autobuild
#
~/src/coreos-vagrant
(0) <monalisa> $ vagrant ssh
Last login: Wed Jan 15 23:47:47 UTC 2014 from 10.0.2.2 on ssh
______ ____ _____
/ ____/___ ________ / __ \/ ___/
/ / / __ \/ ___/ _ \/ / / /\__ \
/ /___/ /_/ / / / __/ /_/ /___/ /
\____/\____/_/ \___/\____//____/
core@localhost ~ $
@kisom
kisom / gtgov.sh
Created August 31, 2013 18:57
Go test code coverage.
#!/bin/sh
if [ -z "$1" ]; then
PKG=$(pwd)
PKG=${PKG##${GOPATH}/src/}
else
PKG=$1
fi
OUTBASE=${PKG##*/}
SLOC=$(gofmt -comments=false $(find ${GOPATH}/src/${PKG} -iname \*.go | xargs)\