Skip to content

Instantly share code, notes, and snippets.

View aoeu's full-sized avatar
🕴️
I'm not available as I am playing a computer game that takes up the whole screen

Travis snɯǝᗡɔW aoeu

🕴️
I'm not available as I am playing a computer game that takes up the whole screen
View GitHub Profile
@aoeu
aoeu / purge_imagemagick.sh
Last active May 31, 2016 19:48
Uninstall ImageMagick using the source code's makefile
#!/bin/sh
processID=$$
startDir=$(pwd -P)
workingDir=/tmp/$processID
goToTempWorkingDir() {
test -d $workingDir || mkdir $workingDir
cd $workingDir
}
@aoeu
aoeu / teensy.sh
Last active November 8, 2015 19:07
Install Teensy 3.1 and Arduino 1.6.5 Release Candidate 5 toolchan on Debian 8 (Jessie)
#!/bin/sh
# This script attempts to automate and document some of the steps of the Teensyduino tutorial:
# https://www.pjrc.com/teensy/tutorial.html
# TODO(aoeu): Properly test this script on a clean install of Ubuntu or Debian Jessie.
set -e
function setup() {
@aoeu
aoeu / _counts.txt
Last active December 25, 2015 23:09
Keyword counts in programming languages.
(trusty)tasm@localhost:/tmp$ wc -l cplusplus
91 cplusplus
(trusty)tasm@localhost:/tmp$ wc -l java
50 java
(trusty)tasm@localhost:/tmp$ wc -l c
32 c
(trusty)tasm@localhost:/tmp$ wc -l python
31 python
(trusty)tasm@localhost:/tmp$ wc -l go
25 go

Keybase proof

I hereby claim:

  • I am aoeu on github.
  • I am aoeu (https://keybase.io/aoeu) on keybase.
  • I have a public key whose fingerprint is FCBB F2D8 B776 7907 C423 1B46 F773 28A2 B75C 3FD8

To claim this, I am signing this object:

<?xml version="1.0" encoding="UTF-8"?>
<scheme name="No Syntax Highlighting" version="124" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_FONT_NAME" value="Menlo" />
<colors />
<attributes>
<option name="ABSTRACT_CLASS_NAME_ATTRIBUTES">
<value>
<option name="EFFECT_TYPE" value="0" />
// https://play.golang.org/p/5rQ7LgR3Wl
package main
import (
"fmt"
"time"
)
type oozer interface{
ooze() string
@aoeu
aoeu / mta.go
Created February 12, 2015 01:31
Poll for the 7 train status with golang!
package main
import (
"errors"
"encoding/xml"
"io/ioutil"
"log"
"net/http"
"net/url"
"time"
# There are some decent settings to copy from:
# http://thume.ca/howto/2012/11/19/using-slate/
alias full move screenOriginX;screenOriginY screenSizeX;screenSizeY
alias lefthalf move screenOriginX;screenOriginY screenSizeX/2;screenSizeY
alias righthalf move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY
alias tophalf move screenOriginX;screenOriginY screenSizeX;screenSizeY/2
alias bottomhalf corner bottom-right resize:screenSizeX;screenSizeY/2
# Quadrant aliases.
alias topleft corner top-left resize:screenSizeX/2;screenSizeY/2
Number of Maine prisoners per 100,000 of population: 150 http://en.wikipedia.org/wiki/Incarceration_in_the_United_States [en.wikipedia.org] »
Total Maine popluation size: 1,329,192 http://en.wikipedia.org/wiki/Maine [en.wikipedia.org] »
Calculated number of prisoners in Maine: 1993.78 ~= 1994
Total cost of Maine State prisons: $132,900,000 http://www.vera.org/files/price-of-prisons-maine-fact-sheet.pdf [www.vera.org] »
Calculated Total Cost per prisoner in the State of Maine: $66,649.95
Is there an alternative to spending $66,649.95 per year to isolate a hermit from society?

Setting up a Chromebook for Go Development

Chrooting the Chromebook

  • Enter Recovery Mode: hold down ESC, Refresh (F3) and press Power button.
  • Press Enter when prompted to turn OS verification off.
  • Press Ctrl and D to enter developer mode. (You may have to do this every time you boot.)
  • After developer mode is enabled, you'll see a warning screen. Press Ctrl and D again to boot the OS.
  • Download the latest crouton: http://goo.gl/fd3zc
  • Press Ctrl, Alt, and T keys in Chrome
  • In the terminal window that appears, type shell