Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
I ship it

Nicholas Whittaker nchlswhttkr

:shipit:
I ship it
View GitHub Profile
@nchlswhttkr
nchlswhttkr / nchlswhttkr.com.nginx
Created Oct 25, 2020
The Nginx config to serve redirects from my old nchlswhttkr.com domain
View nchlswhttkr.com.nginx
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';
@nchlswhttkr
nchlswhttkr / README.md
Last active Apr 7, 2020
Setting up a Buildkite agent on my Raspberry Pi, Cryberry
View README.md

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 / README.md
Last active Jul 6, 2020
Terraria server on a DO droplet
View README.md

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.

View keybase.md

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 / snippets.sh
Last active Oct 18, 2020
Dumping snippets of scripts
View snippets.sh
# 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'
@nchlswhttkr
nchlswhttkr / lovely.swift
Created Jul 4, 2019
It's a little late in the evening and I wrote some Swift
View lovely.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 / init.md
Last active Jan 22, 2021
Quick links and instructions for setting up my devices
View init.md

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 / touch_map.ino
Last active Nov 3, 2017
A copy of the Arduino code used for prototyping in FIT1041
View touch_map.ino
// 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