Skip to content

Instantly share code, notes, and snippets.

@gatlin
gatlin / install-arch-linux-rpi-zero-w.sh
Created May 27, 2018 15:19 — forked from larsch/install-arch-linux-rpi-zero-w.sh
Install Arch Linux ARM for Raspberry Pi Zero W on SD Card (with commands to configure WiFi before first boot).
#!/bin/sh -exu
dev=$1
cd $(mktemp -d)
function umountboot {
umount boot || true
umount root || true
}
# RPi1/Zero (armv6h):
@gatlin
gatlin / index.html
Created March 25, 2017 16:41
large-type
<!DOCTYPE html>
<html>
<head>
<title>Large Type</title>
<link rel="stylesheet/less" type="text/css" href="style.less">
<script type="text/javascript" src="lib/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="lib/less.min.js"></script>
</head>
<body>
<div class="out"><span contenteditable autofocus>*hello*</span></div>
{-
This is a simple simulation of OT with Cloud in which all slaves generate
and apply random operations. It should work in theory. In practice, however
I wasn't apply to test it because my installation of distributed-process is
apparently broken. Specifically, `spawn` doesn't seem to work (I tested it
with some examples from the Well-Typed blog).
This code depends on https://github.com/timjb/haskell-operational-transformation.
-}
@gatlin
gatlin / hackagedocs
Last active September 30, 2015 16:15 — forked from Fuuzetsu/hackagedocs
Script for generating and uploading missing documentation for your Hackage packages. Now with fixed package links and contents page.
#!/usr/bin/env bash
###
# hdoc
# (c) Gatlin Johnson <gatlin@niltag.net>
#
###########
# Available under the following license:
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
#!/bin/sh
if [ ! -d /Library/Frameworks/HaskellPlatform.framework ]
then
if which -s ghc
then
echo "A different Haskell was found." >&2
else
echo "Haskell Platform for OSX is not installed." >&2
fi