Skip to content

Instantly share code, notes, and snippets.

@carterjones
carterjones / install-golang.sh
Created April 25, 2018 15:34
install golang on linux or mac
#!/bin/bash
set -euxo pipefail
target_version="go1.10.1"
# Test to see if go is installed in the PATH.
if which go &>/dev/null; then
# See which version is installed.
installed_version=$(go version | cut -d" " -f3)
@carterjones
carterjones / safe_slice.go
Created February 27, 2018 01:04
a simple generic thread-safe slice type
// Copy/paste this and replace []interface{} with whatever type you want to get
// type safety.
import (
"sync"
)
// SafeSlice is a thread-safe wrapper around an underlying slice.
type SafeSlice struct {
data []interface{}
@carterjones
carterjones / arch-install.sh
Last active October 22, 2017 02:41
How to install Arch
# These are the commands you need to run in order to
# Boot up from the Arch ISO
# Use cfdisk to make a single primary logical Linux partition.
# Don't create a swap disk since we'll use a swap file later.
# Steps:
# 1. Select "dos"
# 2. Create a primary partition (and others if you want).
# 3. Make sda1 bootable.
@carterjones
carterjones / uplink-user-backup.py
Created August 23, 2015 19:38
script to back up the game saves directory for Uplink (http://store.steampowered.com/app/1510/)

Keybase proof

I hereby claim:

  • I am carterjones on github.
  • I am carterjones (https://keybase.io/carterjones) on keybase.
  • I have a public key whose fingerprint is 6DB0 ED84 5B7F 5A67 5E3D 0A82 C64D 140E 380F 7E03

To claim this, I am signing this object: