Skip to content

Instantly share code, notes, and snippets.

View markcol's full-sized avatar

Mark Colburn markcol

View GitHub Profile
@markcol
markcol / dot-config.sh
Last active October 31, 2018 21:41
Shell script to setup a git repository to track dot-files. See https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/
#!/bin/bash
#set -x
checkout () {
mkdir -p .config-backup
${GIT} checkout $@ > /dev/null 2>&1
if [ $? = 0 ]; then
echo "Checked out config.";
else
0x56C52278d33b5b6ccdAe728396AF5092B00C7A7d
0xE5c7Ec8Fc1Fed0e86d76CB596090783C55478554
#!/bin/sh
# Build script for the project.
# For details on the basic form of this script, see https://notabug.org/akkartik/basic-build.
set -e # stop immediately on error
## prolog: environment defaults
test "$CC" || export CC=cc
test "$CFLAGS" || export CFLAGS="-g -O3"
# some additional flags for safety
@markcol
markcol / memoize.go
Last active August 29, 2015 14:05 — forked from cjyar/memoize.go
package memoize
import (
"fmt"
"reflect"
)
// fptr is a pointer to a function variable which will receive a
// memoized wrapper around function impl. Impl must have 1 or more
// arguments, all of which must be usable as map keys; and it must