Skip to content

Instantly share code, notes, and snippets.

View NorseGaud's full-sized avatar
🎯
Focusing

Nathan NorseGaud

🎯
Focusing
View GitHub Profile
@NorseGaud
NorseGaud / AGENTS.md
Last active February 3, 2026 21:44
AGENTS.md

Your job as my repo's agent

You're going to work with me to program and maintain a repository of code. Your goal is to do what I say, but also consider things I may not have considered as you're looking at the code.

Rules I have for you while writing code:

  1. Keep D.R.Y. Create functions for things we repeat or you think are going to be reused.
  2. Variable names need to be explicit about their purpose. They can be long. As long as they're clear about what they're doing.
  3. Only implement elegant solutions. Double check what you do and make sure it's elegant.
  4. When I report a bug, don't start by trying to fix it. Instead, start by writing a test that reproduces the bug. Then, have subagents try to fix the bug and prove it with a passing test.
@NorseGaud
NorseGaud / gist:d3ab02f818b8b5080d90c642aa667796
Created January 29, 2026 22:41
CFO SIlvia Profile Preferences Prompt
_____
Role & Mindset
You are my Personal CFO. Think like a disciplined investor, risk manager, and long-term planner. Your job is to optimize my financial life for durability, upside, and freedom—not lifestyle inflation. Be direct, data-driven, and practical. If tradeoffs exist, explain them clearly.
Context & Data
I will provide you with my financial data, which may include:
Assets (cash, investments, businesses, real estate, crypto, alternatives)
@NorseGaud
NorseGaud / AnimatedPickerItem.js
Created August 28, 2025 13:59
React Native Wheel Picker for Android and iOS
import React, { memo } from 'react';
import {Text, Animated, StyleSheet, useColorScheme} from 'react-native';
import { ThemedText } from '../ThemedText';
import { colors } from '@/constants/Colors';
const AnimatedPickerItem = ({
item,
index,
scrollY,
itemHeight,
@NorseGaud
NorseGaud / gist:c2e7207c765da0e81e5a267061c4301a
Created July 5, 2025 23:14
metro losing websocket after 5 seconds of backgrounded development app
2025-07-05 09:56:20.564 28692-3662 ReactNativeJS app.maestro.expo.testing I 'AppState has come to the background!', 0.3781958716722012
2025-07-05 09:56:20.565 1281-1825 EGL_emulation com...le.android.apps.nexuslauncher D app_time_stats: avg=42.64ms min=2.58ms max=671.60ms count=19
2025-07-05 09:56:20.581 972-1859 WindowManagerShell com.android.systemui V onTransitionReady(transaction=3092376767864)
2025-07-05 09:56:20.582 972-1014 WindowManagerShell com.android.systemui V onTransitionReady (#15952) android.os.BinderProxy@d86492e: {id=15952 t=TO_FRONT f=0x0 trk=0 r=[0@Point(0, 0)] c=[{WCT{android.window.IWindowContainerToken$Stub$Proxy@bb9241d} m=TO_FRONT f=MOVE_TO_TOP leash=Surface(name=Task=162)/@0x3e25006 sb=Rect(0, 0 - 1080, 2424) eb=Rect(0, 0 - 1080, 2424) d=0 taskParent=-1},{WCT{android.window.IWindowContainerToken$Stub$Proxy@2436692} m=TO_BACK f=NONE leash=Surface(name=Task=166)/@0x66216c7 sb=Rect(0, 0 - 1080, 2424)
@NorseGaud
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 ()
BASE=${BACKOFF_BASE:-1}
MAX=${BACKOFF_MAX:-60}
FAILURES=0
while (
# Code here
) 2>&1; RC=$?; [[ $RC -ne 0 ]]; do
FAILURES=$(( $FAILURES + 1 ))
@NorseGaud
NorseGaud / xcode-prep.bash
Created May 5, 2023 00:24
xcode preparation commands
XCODE_DESTINATION="/Applications"
sudo /usr/sbin/dseditgroup -o edit -a everyone -t group _developer
sudo xcode-select -s ${XCODE_DESTINATION}/Xcode.app/Contents/Developer
sudo xcodebuild -license accept
sudo xcodebuild -runFirstLaunch
sudo DevToolsSecurity -enable
for PKG in $(/bin/ls ${XCODE_DESTINATION}/Xcode.app/Contents/Resources/Packages/*.pkg); do
sudo /usr/sbin/installer -pkg "$PKG" -target /
done
@NorseGaud
NorseGaud / nlimit.plist
Created June 15, 2021 18:27
/Library/LaunchDaemons/nlimit.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>nlimit</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
@NorseGaud
NorseGaud / anka-controller.yml
Created January 5, 2021 22:29
Kubernetes anka-controller example
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
version: v1.13.0
labels:
app: anka-controller
release: anka-controller
name: anka-controller
@NorseGaud
NorseGaud / golang-mailchimp-api-calls-with-offset-loop.md
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(
	&gochimp3.InterestCategoriesQueryParams{
@NorseGaud
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