Skip to content

Instantly share code, notes, and snippets.

View nathan-muir's full-sized avatar

Nathan Muir nathan-muir

View GitHub Profile
Selection
browse
select -> editOne
beginSelectRectangle -> drawSelectRectangle
editOne
select -> editOne
removed -> browse
addOneSelect -> selected
beginSelectRectangle -> drawSelectRectangle
selected
Toolbox
select_tool
select_one -> edit_tool
select_many -> move_tool
# open_tool ->
edit_tool
# text, image, legend are always edit_tool
# switch_tool -> other_tool
save -> select_tool
close -> select_tool
@nathan-muir
nathan-muir / SketchSystems.spec
Created February 6, 2019 00:55
ChargifyAccount
ChargifyAccount
start
signup -> trial
trial
cancel -> cancelled
expire -> trial_ended
activate -> active
trial_ended
retry -> trial
activate -> active
@nathan-muir
nathan-muir / SketchSystems.spec
Last active January 14, 2019 06:11
Invoicing
Invoicing
start
fetch -> awaiting_send
migrated -> done
awaiting_send
begin -> sending
sending
skip -> skipped
done -> awaiting_import
error -> error_sending
Initialise
LoggedInAndReady -> CheckIndexedDB
CheckIndexedDB
No Data? -> InitialFetch
Recent Data? -> FetchChangesSince
Old Data? -> InitialFetch
InitialFetch
FetchedEverything -> WatchForUpdates
DualLock
Locked
Both
unlock a -> OnlyB
unlock b -> OnlyA
OnlyB
lock a -> Both
unlock b -> Unlocked
OnlyA
lock b -> Both
Off
Boot -> Startup
Startup
success? -> Waiting
failure? -> Error
Waiting
choose plan -> Loading
Shutdown -> Off
Loading
@nathan-muir
nathan-muir / terraform-move-state-between-remote-backends.sh
Created January 25, 2018 01:34
Terraform move state between remote backends
#!/usr/bin/env bash
# Get a local copy of the destination project state
cd project_dest
terraform state pull > remote.tfstate
# Move from the SRC project to the DEST project
cd ../project_src
terraform state mv \
@nathan-muir
nathan-muir / blazejs-template-helpers.js
Created January 23, 2018 08:38
Meteor Blaze JS CodeShift
/**
* jscodeshift script that converts
* Template.xyz.{helperName} = function(){}
* to use
* Template.xyz.helpers({ helperName: function(){} })
*/
export default function transformer(file, api) {
let j = api.jscodeshift;
@nathan-muir
nathan-muir / uninstall-pip.sh
Created August 3, 2017 12:28
Uninstall packages installed by pip
pip list --local --format json | jq '[ .[] | .name] | join("\n")' -r | xargs pip uninstall -y