Skip to content

Instantly share code, notes, and snippets.


Nathaniel nathanielks

View GitHub Profile
nathanielks /
Created Oct 15, 2021 — forked from webframp/
Signing git commits on github using gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key


CloudFormation -> Terraform Import Helpers

I wrote these scripts to help faciliate batch import of our CloudFormation templates into Terraform Configuration.

This script is a light wrapper around It simply iterates over the list of regions provided, exports expected variables, creates required directories, and calls

BASE_DIR=/path/to/dir EXCLUDE_REGEX="(some-stack-production|some-stack-staging)" ./ us-east-1 us-west-1
nathanielks /
Last active Jan 17, 2017 — forked from indolering/
Shell script to generate TLS certificates for local development (.test, .example, etc)
nathanielks / delete_expired_sessions.sql
Created Sep 29, 2016
SQL query to delete expired WooCommerce Sessions.
View delete_expired_sessions.sql
delete from t1, t2
using wp_options t1
join wp_options t2 on t2.option_name = replace(t1.option_name, '_expires', '')
where (t1.option_name like '\_wc\_session\_expires\_%')
and t1.option_value < UNIX_TIMESTAMP(NOW())
View personal-vnc.conf
# /etc/init/personal-vnc.conf
# Use the service command:
# sudo service personal-vnc {start,stop,restart,status}
description "Manages VNC connection. Runs on boot"
start on runlevel [2345]
stop on runlevel [06]
# $ cat template.json | PACKER_LOG=1 packer build -debug -
2016/03/12 13:23:31 [INFO] Packer version: 0.9.0 a643faae672ec8b8424352476d2b91b7a7f7b06e+CHANGES
2016/03/12 13:23:31 Packer Target OS/Arch: darwin amd64
2016/03/12 13:23:31 Built with Go Version: go1.6
2016/03/12 13:23:31 Detected home directory from env var: /Users/aang
2016/03/12 13:23:31 Using internal plugin for vmware-vmx
2016/03/12 13:23:31 Using internal plugin for docker
2016/03/12 13:23:31 Using internal plugin for parallels-pvm
2016/03/12 13:23:31 Using internal plugin for qemu
View __name__Route.js
// polyfill webpack require.ensure
if (typeof require.ensure !== 'function') require.ensure = (d, c) => c(require)
export default <% if (addStore) { %>(store) => (<% } %>{
path: '<%= camelEntityName %>',
getComponents (location, cb) {
'views/<%= pascalEntityName %>View/<%= pascalEntityName %>View'
], (require) => {
let view = require('views/<%= pascalEntityName %>View/<%= pascalEntityName %>View').default
nathanielks / calc.js
Created Nov 27, 2015
Super simple way to calculate how long an course is
View calc.js
var seconds = 0;
$('.table.table-condensed .info-line small.duration').each(function(){
var s = this.innerText.split(':');
seconds += s[0] * 60;
seconds += s[1] * 1;
nathanielks /
Last active Jun 18, 2022
Simple wrapper around terraform to manage multiple environments

This script will pull down an S3 remote configuration before running any terraform actions. Assumes the following structure:

Keybase proof

I hereby claim:

  • I am nathanielks on github.
  • I am nathanielks ( on keybase.
  • I have a public key whose fingerprint is E5F6 FFB4 3651 D39A 25B9 1DAD FE02 07A3 8BD5 4DC4

To claim this, I am signing this object: