Skip to content

Instantly share code, notes, and snippets.

View josephtaylor's full-sized avatar

J. Taylor O'Connor josephtaylor

View GitHub Profile
@josephtaylor
josephtaylor / bump.sh
Created October 13, 2017 16:47 — forked from marcuswhybrow/bump.sh
Script to bump the major, minor or patch number by adding a new tag to the git repository, and modifying the "latest" tag.
#!/usr/bin/env bash
latest_tag=$(git tag -l *.*.* --contains $(git rev-list --tags --max-count=1))
if [[ ! "$latest_tag" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "The \"latest\" tag did not exist, or did not point to a commit which also had a semantic version tag."
exit 1
fi
major=$(echo "$latest_tag" | awk -F '.' '{print $1}')
@josephtaylor
josephtaylor / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

After installing Arch on my Raspberry Pi, internet worked out of the box: I could plug it into the router, turn it on, ssh in and start downloading things. But the router is in my housemate's bedroom, which isn't ideal. If I want the Pi to be connected to the internet in my room, I need it to be connected to my laptop. (Another option would be a USB wifi dongle, of course.) This is how I did it. Much credit goes to the Ubuntu wiki's Connection sharing page.

I should disclaim that I don't fully understand networking stuff, and some of what I say might be wrong. I also didn't write this as I was going; so while I've consulted my browser and shell histories, it's possible I've forgotten some steps.

My laptop is running Gentoo, and this is where most of the work has to be done. It connects to the internet through wifi, on interface wlan0. The ethernet port is eth0, and eth0 is also the name of the ethernet port on the Pi.

Step zero: plug ev