Skip to content

Instantly share code, notes, and snippets.

View NathanielInman's full-sized avatar
🎯
Focusing

Nathaniel Inman NathanielInman

🎯
Focusing
View GitHub Profile
@NathanielInman
NathanielInman / git-hash.txt
Created May 2, 2017 19:28
Get hashes for git tags
# List all branches and their hashes on remote
git ls-remote --head
# List all tags and their hashes on a remote server
git ls-remote -t
# Get hash for a specific tag
git rev-parse v1.1.0
# Get last tag for current branch
@NathanielInman
NathanielInman / aws-auth.sh
Created January 22, 2021 18:53
aws-auth.sh allows MFA for aws-cli
#!/bin/bash
# A script that makes it easier to use the AWS CLI with MFA enabled. It fetches your temporary AWS STS credentials and
# writes text to stdout that exports those credentials as the proper environment variables for use with the AWS CLI.
set -e
readonly SCRIPT_NAME=$(basename "$0")
readonly EMPTY_VAL="__EMPTY__"
readonly DEFAULT_MFA_TOKEN_DURATION_SECONDS=43200 # 12 hours
readonly DEFAULT_ROLE_DURATION_SECONDS=43200 # 12 hours
0 0 - Hickory Lane
| 1 - An Overgrown Lawn
4----1 2 - Tranquil Koi Pond
| | 3 - The Palladium Temple
2----3 4 - A Pergola Covered Workshop
| 5 - Statue of Elbar
5
.-=-._.-=-._.-=-._.-=-._.-=-._.-=-._.-=-._.-=-._.-=-._.-=-._.-=-.
:> 1.
@NathanielInman
NathanielInman / adventuresUnlimited.txt
Created October 22, 2020 15:12
tintin basic state controller
#var {state}{none}
#action {%1 says 'spell'}{
#if {"$state" == "none"} {
#var {state}{one};
/* here you'd do stuff based on initial state */
};
#elseif {"$state" == "one"} {
#var {state}{two};
/* here you'd do stuff based on next state step */
};
@NathanielInman
NathanielInman / manor
Last active May 22, 2020 19:26
15 room public duke house for Jixx, plus temple shrine
8----B 1 - Ruined Gates of An Ancient Manor
2----5 | C 2 - Northwestern Overgrown Courtyard
| | |/ 3 - Western Overgrown Courtyard
1----3----6----9 4 - Southwestern Overgrown Courtyard
| | / 5 - Northeastern Overgrown Courtyard
4----7 / D----F 6 - The Palladium Fountain
/ | 7 - Southeastern Overgrown Courtyard
G----A----E 8 - The Dining Room
9 - The Vestibule
A - (search down) A Fracture Cave
@NathanielInman
NathanielInman / gist:a3105914df32c5b368521d5bc0842c2b
Created May 8, 2020 16:14
How do balance equipment statistics
1.
First, in order to algorithmically change everything you need a weight for each
statistic; otherwise we don't know how they compare across levels.
strength: 1
hitroll: 1.5
damroll: 2
2.
Now you need a baseline score for the first level of the game and the last level of the game.
@NathanielInman
NathanielInman / keybase.md
Last active April 28, 2020 19:06
keybase.md

Keybase proof

I hereby claim:

  • I am nathanielinman on github.
  • I am nathanielinman (https://keybase.io/nathanielinman) on keybase.
  • I have a public key whose fingerprint is F8C2 B9C5 A43B B13D 5D22 0FC9 63EF 6A21 404A 30B9

To claim this, I am signing this object:

@NathanielInman
NathanielInman / states.geojson
Last active February 12, 2019 16:05
States Geojson With Region and Abbrev
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NathanielInman
NathanielInman / padding-helper-non-abbrev
Last active December 12, 2018 18:52
Padding and margin helper created with stylus
/*
* This is a padding and margin helper used in many frameworks like `Vuetify`
* except it supports responsive and is easily extendable and uses `em` instead
* of pixels. (https://zellwk.com/blog/media-query-units/)
*
* .pr-2h = padding-right: 2.5rem
* .my-xs-3.my-md-0 = margin top and bottom (y-axis) 3rem on all sizes up to medium
*
*/
@NathanielInman
NathanielInman / jsDateNeedsFixed.txt
Last active March 20, 2017 16:29
Javascript new Date() in local time is wrong and how to fix
new Date('2017-02-20').getDay()
=> 0 // February 20th of 2017 is a MONDAY not SUNDAY!!!
new Date('2017-02-20')
=> Sun Feb 19 2017 18:00:00 GMT-0600 (CST) //hmm... so its converting to local time?
new Date('2017-02-20 00:00:00')
=> Mon Feb 20 2017 00:00:00 GMT-0600 (CST) //aha! it is, so how do we fix it?
new Date(new Date('2017-02-20').getTime() + (new Date('2017-02-20').getTimezoneOffset() * 60000))