Skip to content

Instantly share code, notes, and snippets.

View NobodyNada's full-sized avatar

Jonathan Keller NobodyNada

  • Corvallis, OR
View GitHub Profile
@NobodyNada
NobodyNada / NBTSerializer.swift
Last active July 17, 2017 18:38
A simple NBT serializer and deserializer in Swift, using my Serializer library.
// NBTSerializer
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
@NobodyNada
NobodyNada / keybase.md
Created June 2, 2017 21:09
Keybase proof

Keybase proof

I hereby claim:

  • I am NobodyNada on github.
  • I am nobodynada (https://keybase.io/nobodynada) on keybase.
  • I have a public key whose fingerprint is E0A0 D898 4D3D 3218 9D8A 4767 75B2 5957 70C0 352E

To claim this, I am signing this object:

@NobodyNada
NobodyNada / firealarm.sh
Created March 23, 2017 20:27
Bash script to automatically reboot FireAlarm
#!/bin/bash
function line() {
echo "-----------------------------------------------------"
}
ulimit -c unlimited
printf "\n\n"
line
@NobodyNada
NobodyNada / swift_rpi.md
Last active June 8, 2017 19:55
Compiling Swift on Raspberry Pi

Compiling Swift on Raspberry Pi

This guide was written for FireAlarm, but it will work for other Swift projects as well.

Note: Many of these steps will take a long time (up to several hours). To run a command in the background (so it won't die with your SSH session), I often run the command with time (<command here>) > filename.log 2>&1 &.

Update and install dependencies

Because some packages are not available in the latest stable release, Raspbian must be updated to Stretch, the testing release. Unfortunately, the Wi-Fi firmware in Stretch is broken. To prevent it from being updated, run sudo apt-mark hold firmware-brcm80211. If you update to Stretch without doing this (which I did), you can downgrade by running sudo apt-get install firmware-brcm80211=0.43+rpi5 (while connected over Ethernet, of course).

Edit /etc/apt/sources.list and replace jessie with stretch in the first line. The first line should now look like this: