Skip to content

Instantly share code, notes, and snippets.

View nchlswhttkr's full-sized avatar
:shipit:
I ship it

Nicholas Whittaker nchlswhttkr

:shipit:
I ship it
View GitHub Profile
@nchlswhttkr
nchlswhttkr / touch_map.ino
Last active November 3, 2017 09:17
A copy of the Arduino code used for prototyping in FIT1041
// touch_map.ino
// Authored By: Nicholas Whittaker
// FIT1041: Research Project
// Tangible Interfaces for the Vision Impaired
// WAVE SHIELD LIBRARY
// https://github.com/adafruit/WaveHC
// Code for reading and playing sound from the chip has been copied and adapted from the
// example files, as well as from the tutorials on Adafruit.com
@nchlswhttkr
nchlswhttkr / init.md
Last active January 22, 2021 12:52
Quick links and instructions for setting up my devices

init


MacOS

Sign in to iCloud and update system settings.

  • Update date/time display settings
  • Enable tap-to-click and gestures for the Trackpad
@nchlswhttkr
nchlswhttkr / lovely.swift
Created July 4, 2019 14:34
It's a little late in the evening and I wrote some Swift
let numbers: Array<Int> = Array(1..<11)
enum IsOddError: Error {
case noNumberProvided
case throwForTheHeckOfIt
}
func isOdd(number n: Int?) throws -> Bool {
if let value = n {
if value == 10 { throw IsOddError.throwForTheHeckOfIt }
@nchlswhttkr
nchlswhttkr / snippets.sh
Last active October 18, 2020 07:40
Dumping snippets of scripts
# files added from latest commit
git diff-tree --no-commit-id --name-status -r HEAD | grep "^A" | cut -f 2
# grab jira id from current branch, append to the current commit message
# can be run as a pre-commit hook, might need to tailor the sed pattern though
git branch | grep "^*" | sed -E "s/.*\/([A-Z]+-[1-9][0-9]*).*/.JIRA ID - \1/" | tr "." "\n" >> .git/COMMIT_EDITMSG
# get a list of emails from contributors on a git repo
git shortlog -se | sed -n 's/.*<\(.*@.*\)>.*/\1/p'

Keybase proof

I hereby claim:

  • I am nchlswhttkr on github.
  • I am nchlswhttkr (https://keybase.io/nchlswhttkr) on keybase.
  • I have a public key ASDNv1zhr7hBMED9UgvjJU9BO5AwTCCTEV69Qr6PR1ut_Qo

To claim this, I am signing this object:

@nchlswhttkr
nchlswhttkr / README.md
Last active July 6, 2020 17:26
Terraria server on a DO droplet

Running Terraria on a DO droplet

Code from Debugging my Terraria Server's Startup.

terraria.nchlswhttkr.com:7777 for my server (if up).

This runs in a detached screen, managed by systemd.

You can download the server itself off the official Terraria website, place the contents of the Linux directory on a local terraria user in your droplet, with the accompanying server.config and terraria.service.

@nchlswhttkr
nchlswhttkr / README.md
Last active April 7, 2020 10:51
Setting up a Buildkite agent on my Raspberry Pi, Cryberry

Running the Buildkite agent on Linux

You might need to update some paths/names

mkdir -p .config/systemd/user
nano .config/systemd/user/buildkite-agent.service

sudo loginctl enable-linger nicholas
@nchlswhttkr
nchlswhttkr / nchlswhttkr.com.nginx
Created October 25, 2020 05:18
The Nginx config to serve redirects from my old nchlswhttkr.com domain
server {
listen 443 ssl http2;
server_name nchlswhttkr.com;
ssl_certificate /home/nicholas/nchlswhttkr.com.certificate;
ssl_certificate_key /home/nicholas/nchlswhttkr.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';