This is a personal reference workflow for minimizing token usage while maintaining project continuity across Claude Code (Sonnet 4 with file access).
Claude loads CLAUDE.md automatically at session start.
| using UnityEngine; | |
| using System.Collections.Generic; | |
| // Written by Steve Streeting 2017 | |
| // License: CC0 Public Domain http://creativecommons.org/publicdomain/zero/1.0/ | |
| /// <summary> | |
| /// Component which will flicker a linked light while active by changing its | |
| /// intensity between the min and max values given. The flickering can be | |
| /// sharp or smoothed depending on the value of the smoothing parameter. |
| # NOTE | |
| # | |
| # | |
| # Use sed on the instance up to replace the INSTANCE_ID and DNS_RESOLVER with the following commands | |
| # | |
| #################################################################################################### | |
| # Fetch the private IP for resolving DNS dynamically in nginx | |
| # We also need to escape the `.` from it for usage in later sed | |
| # | |
| # DNS_RESOLVER=`grep nameserver /etc/resolv.conf | cut -d " " -f2 | sed 's/\./\\./g'` |
| # Rock64 Install (Adjust IPs/Hostnames/DNS to your deployment) | |
| Disable NetworkManager and DHCP Client | |
| sudo systemctl stop dhcpcd | |
| sudo systemctl stop NetworkManager | |
| sudo systemctl disable dhcpcd | |
| sudo systemctl disable NetworkManager | |
| sudo systemctl daemon-reload |
| #!/bin/bash | |
| echo "Container Linux installation script" | |
| echo "This will install:" | |
| echo " - Docker Community Edition" | |
| echo " - Docker Compose" | |
| echo " - Kubernetes: kubeadm, kubelet and kubectl" | |
| echo "" | |
| set -xeo pipefail |
Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.
| #!/usr/bin/python | |
| import os | |
| import subprocess | |
| import time | |
| import yaml | |
| import re | |
| user_name = os.environ.get("DOCKERHUB_USER") |
Command
aws s3api list-buckets --query 'Buckets[*].[Name]' --output text | xargs -I {} bash -c 'if [[ $(aws s3api get-bucket-acl --bucket {} --query '"'"'Grants[?Grantee.URI==`http://acs.amazonaws.com/groups/global/AllUsers` && Permission==`READ`]'"'"' --output text) ]]; then aws s3api put-bucket-acl --acl "private" --bucket {} ; fi'1. List all of the user's buckets, and output the name, as text.
| #!/bin/sh | |
| # Install brew | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| # Install the experimental NVIDIA Mac drivers | |
| # Download from http://www.nvidia.com/download/driverResults.aspx/103826/en-us | |
| # Install cuDNN v5 for 8.0 RC or use the latest when it's available | |
| # Register and download from https://developer.nvidia.com/rdp/cudnn-download | |
| # or this path: https://developer.nvidia.com/rdp/assets/cudnn-8.0-osx-x64-v5.0-ga-tgz | |
| # extract to the NVIDIA CUDA folder and perform necessary linking |