// I search twitter for the following strings. I'm looking specifically for questions that start with | |
// 'do you' or 'are you', but do not contain certain key words. | |
_.when( | |
search('"do you" -what -why -who -where -which -when -how'), | |
search('"are you" -what -why -who -where -which -when -how') | |
) | |
.done(function(doYou,areYou) { | |
// I take the raw search results and I snip away | |
// the "do you" or "are you" and just grab the rest of the sentence. So "Are you a magician?" becomes | |
// "a magician". I collect a bunch of these. (I strip away "what" and similar, because "what are you |
# Adapted from http://www.lua.org/manual/5.2/manual.html | |
# No comments implemented yet, because lua comments are hard. | |
Chunk -> _ Block _ | |
Block -> _Block | |
| _Block __ ReturnStat | |
ReturnStat -> "return" __ ExpList | |
| "return" __ ExpList _ ";" |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
(ns splay-rope.core) | |
(declare traverse) | |
(deftype Node [^int offset | |
^String data | |
left | |
right] | |
Object | |
(toString [node] |
Update (2019-05-06): The Broadcom wireless card in the MacBook Pro works and can be crammed into the Air.
Update (2015-12-04): This document used to be very lengthy as there were many manual steps required to get OpenBSD and Mac OS X working together through Boot Camp Assistant (BCA), which created a hybrid MBR and enabled a legacy BIOS emulation mode which older versions of Windows (and OpenBSD) required. Newer Macbooks stopped supporting older versions of Windows through BCA and now only support Windows 10 since it uses GPT and UEFI. However, now that newer versions of OpenBSD support GPT and UEFI, Boot Camp Assistant is no longer needed at all to boot OpenBSD.
OpenBSD works pretty well on at least the Mid-2011 Macbook Air (A1370, SandyBridge) and Mid-2013 Macbook Air (Haswell). The new KMS code in 5.4 brings up the MBA's eDP display in 1366x768 with backlight
main: main.c shim.o | |
shim.o: foo.c foo_shim.c foo.h | |
# | |
# Compile Files | |
gcc foo.c -c -o foo.o | |
gcc foo_shim.c -c -o foo_shim.o | |
# | |
# Rename the symbol we care about: foo -> old_foo | |
objcopy --redefine-sym foo=old_foo foo.o _foo.o | |
# |