Skip to content

Instantly share code, notes, and snippets.

View goldcaddy77's full-sized avatar
💭
3Play is hiring! Email me if interested.

Dan Caddigan goldcaddy77

💭
3Play is hiring! Email me if interested.
View GitHub Profile
@goldcaddy77
goldcaddy77 / nvm.zsh
Created September 15, 2020 00:10
NVM autoload in ZSH
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(/bin/cat "${nvmrc_path}")")
@goldcaddy77
goldcaddy77 / nvmrc.zsh
Created May 12, 2020 16:24
Auto NVM use for ZSH
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
@goldcaddy77
goldcaddy77 / gups.sh
Created May 11, 2020 16:04
gups - Git update from remote and rebase in one command
# Sync your local base branch with remote (Github) and
# rebase from base, all in one command
# Can be run in both a clean state or with unstaged changes
function gups() {
current_branch=$(current_branch)
local base_br=$1
# Allow specifying which base branch we want to update from
# this is almost always develop (or master in repos that don't use develop)
if [ "$base_br" = "" ]; then
base_br=$(base_branch)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
@goldcaddy77
goldcaddy77 / machine.js
Created December 17, 2019 00:08
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
initial: 'idle',
context: {
retries: 0
},
states: {
idle: {
on: {
@goldcaddy77
goldcaddy77 / warthog-talk.sh
Last active December 12, 2019 17:01
Warthog Talk Bootstrap
```
# Adds a package.json so that we can install Warthog
yarn init --yes
# Add warthog so that we can use the CLI
yarn add warthog
# Bootstrap a new application using Warthog CLI
yarn warthog new tech-talk
@goldcaddy77
goldcaddy77 / keybase.md
Created November 29, 2017 06:10
keybase.md

Keybase proof

I hereby claim:

  • I am goldcaddy77 on github.
  • I am goldcaddy77 (https://keybase.io/goldcaddy77) on keybase.
  • I have a public key ASDjIkLItQ-uAC2s_4v8u_1vW1fFThX6Yr4yT03vk0Y9qQo

To claim this, I am signing this object:

HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 22192
Server: Werkzeug/0.10.4 Python/3.4.3
Date: Thu, 21 May 2015 19:09:42 GMT
{
"campaign": {
"name": "15_Z1B_HIS_Q1-Q4_North Florida Hispanic_SOUTHEAST_MOB",
"advertiser_name": "MS Ford_FDAF_2015",
@goldcaddy77
goldcaddy77 / gist:853f021d9c31cc0b9723
Created December 19, 2014 21:21
Tags - Caddy / Markey
*** Banner
=> ["Publisher Tags for Inventory custom_inventory_dogfood_banner", "", "Source UID,Width,Height,Domain,Page Url,Content Channel ID,Creative Formats,Passback Rate Target,Content Channel Name,Secure,Publisher Tag", "0UpZkP1oHT,300,250,www.dataxu.com,,IAB1,BANNER+RICHMEDIA,0.5,Arts & Entertainment,false,<SCRIPT TYPE=\"text/javascript\" SRC=\"http://tags.w55c.net/pi/trs998?source=0UpZkP1oHT&w=300&h=250&domain=www.dataxu.com&url=&cat=IAB1&ctypes=BANNER+RICHMEDIA&pbr=0.5&ord=[timestamp]\"></SCRIPT>"]
irb(main):335:0>
*** Video
=> ["Publisher Tags for Inventory custom_inventory_dogfood_video", "", "Source UID,Width,Height,Domain,Page Url,Content Channel ID,Creative Formats,Passback Rate Target,Video Duration,Companion Sizes (300x250,728x90),Placement (PRE, MID, POST),Content Channel Name,Secure,Publisher Tag", "0Ufhhg0Mcm,336,280,www.dataxu.com,,IAB1,VIDEO,0.5,30,,,Arts & Entertainment,false,http://tags.w55c.net/pi/trs998?source=0Ufhhg0Mcm&w=336&h=280&domain=www.dataxu.com&url=&cat=IAB1&ctypes=VIDEO&pb