Skip to content

Instantly share code, notes, and snippets.

View adiabatic's full-sized avatar

adiabatic

View GitHub Profile
@adiabatic
adiabatic / gist:5147308
Created March 12, 2013 21:38
Creating 4k-aligned FreeBSD slices with headroom
gpart create -s GPT ada1
gpart create -s GPT ada2
gpart create -s GPT ada3
# find out the sector count of each of these disks
dmesg | grep ada | grep sectors
# OK, 3,907,029,168 512-byte sectors per disk.
# make a bunch of disks that use up a little bit less space than max
# in case I need to replace one of these drives with slightly fewer sectors
# coding: UTF-8
# This file is in the public domain.
from itertools import chain
# documentation — yes, it is being overwritten in the very next line
pangram = u"What is the price of a foot-bath kit? A goose in a dress near North Square thought it would cure jelly ankle. The goat nurse suggested palm oil in the mouth or wrapped around the ankle with a cloth."
pangram = u"      - ?       ·       .                 ."
letters = u"""p b t d k g T D f v s z S Z tS dZ j w h W N m n l r
I i E eI { A O Q oI @ aU oU U u""".split()
@adiabatic
adiabatic / ame.fea
Created July 8, 2013 16:41
The character sequence "roe it" (two Quikscript letters) gets turned into "roe.s2 it.2s".
# Glyph names and lookup names must be:
# - up to 31 characters
# - be comprised of A-Z a-z 0-9 . _
# - must not start with a digit or period (underscores OK)
# glyph names and lookup names can be 31 characters;
# glyph class names (lists) max out at 30.
##############################################################
@adiabatic
adiabatic / chbg.sh
Last active August 29, 2015 14:12
Change all backgrounds to either light or dark, depending.
case $1 in
light)
imageFile="/Library/Desktop Pictures/Solid Colors/Solid White.png"
;;
dark)
imageFile="/Library/Desktop Pictures/Solid Colors/Solid Gray Pro Ultra Dark.png"
;;
*)
imageFile=""
;;