Skip to content

Instantly share code, notes, and snippets.

View NorseGaud's full-sized avatar

Nathan NorseGaud

View GitHub Profile
NorseGaud / exponential-backoff-with-limit.bash
Created August 2, 2023 17:44
BASH script: exponential backoff with limit of 60s
set -E # required to get exit code from while ()
while (
# Code here
) 2>&1; RC=$?; [[ $RC -ne 0 ]]; do
NorseGaud / xcode-prep.bash
Created May 5, 2023 00:24
xcode preparation commands
sudo /usr/sbin/dseditgroup -o edit -a everyone -t group _developer
sudo xcode-select -s ${XCODE_DESTINATION}/
sudo xcodebuild -license accept
sudo xcodebuild -runFirstLaunch
sudo DevToolsSecurity -enable
for PKG in $(/bin/ls ${XCODE_DESTINATION}/*.pkg); do
sudo /usr/sbin/installer -pkg "$PKG" -target /
NorseGaud / nlimit.plist
Created June 15, 2021 18:27
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
NorseGaud / anka-controller.yml
Created January 5, 2021 22:29
Kubernetes anka-controller example
apiVersion: apps/v1
kind: Deployment
version: v1.13.0
app: anka-controller
release: anka-controller
name: anka-controller
NorseGaud /
Last active March 12, 2020 18:04
Golang: Mailchimp API calls with gochimp3 and an offset loop

Problem: Mailchimp limits you to 1000 entrys at a time, but provides an offset to get the rest.

Solution: In a loop, handle changing the offset so we can collect everything into an array and get the details we need.

  • Requires gochimp3
fmt.Println("[Pulling Data From Mailchimp]")
mailchimpListTotalItems, err := mailchimpConnection.NewListResponse("XXXXXXXX").GetMembers(
NorseGaud / gist:2af685d05436abc1eeeaf7ea4f23e14f
Created March 3, 2019 19:13
nodeos_under_min_avail_ram_lr_test failure
This file has been truncated, but you can view the full file.
Test project /Users/norsegaud/eos/build
Start 66: nodeos_under_min_avail_ram_lr_test
1/1 Test #66: nodeos_under_min_avail_ram_lr_test ...***Failed 181.82 sec
kill: 84963: No such process
kill: 84964: No such process
kill: 84965: No such process
kill: 84966: No such process
kill: 84967: No such process
launching bios
spawning child, programs/nodeos/nodeos --max-transaction-time -1 --abi-serializer-max-time-ms 990000 --filter-on * --p2p-max-nodes-per-host 4 --chain-state-db-guard-size-mb 1002 --chain-state-db-size-mb 1010 --contracts-console --config-dir etc/eosio/node_bios --data-dir var/lib/node_bios --genesis-json etc/eosio/node_bios/genesis.json --genesis-timestamp 2019-03-03T17:52:05.695