Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7f37afd
Customize for github.com
gremsam Oct 28, 2019
f6da5bf
bitbucket mapping
gremsam Oct 28, 2019
d70bf7b
Add zshrc
gremsam Nov 1, 2019
9bf3469
Cleanup
gremsam Nov 1, 2019
0c1c71b
Some of our projects are not conducive to dynamic loading
gremsam Nov 1, 2019
ec5a290
Split out zshrc
gremsam Nov 1, 2019
959e505
I forget how ls colors work
gremsam Nov 11, 2019
b996f9b
Disable this until I can figure out what broke
gremsam Nov 11, 2019
f8243da
Fish/zsh compat
gremsam Nov 11, 2019
cf59f9a
Update README.md
gremsam Nov 11, 2019
3587bf7
Update README.md
gremsam Nov 11, 2019
e14c63d
Fix home reference
gremsam Nov 11, 2019
77381c0
New Aliases
gremsam Mar 25, 2020
a39604d
envI
gremsam Mar 25, 2020
b16ed2c
Setup gcloud sdk
gremsam Mar 25, 2020
13b39c5
Vim Replace!
gremsam Mar 25, 2020
c761b3b
Useful Pods
gremsam Mar 25, 2020
60174e7
Update README.md
gremsam Mar 25, 2020
3732dc5
Fix location
gremsam Mar 25, 2020
f1059ca
iso_date
gremsam Apr 13, 2020
156ee46
Add escape pod
gremsam May 6, 2020
84b9254
Simple echo service for demonstrating k8s ingress
gremsam May 14, 2020
6ebf1cc
New aliases
gremsam Aug 20, 2020
af343fc
setup history
gremsam Aug 20, 2020
807dbba
Setup Minikube host address for dns
gremsam Nov 23, 2020
3ad84fc
Minor updates
gremsam Apr 20, 2021
a17aa40
Add debug mode
gremsam Apr 26, 2021
7ae186e
Only update minikube if running
gremsam Apr 26, 2021
807e94e
migrate to new docker-compose
gremsam Apr 26, 2021
97d91d2
checkpoint
gremsam Feb 18, 2022
d5ecff7
Change default branch name
gremsam Jul 19, 2022
ec5496b
Update Vim Colors
gremsam Sep 20, 2022
b825e9d
Remove pre-java9 arg
gremsam Feb 17, 2023
16ea553
Set Tmux Window to Hashed DIR
gremsam Feb 22, 2023
52fe6dd
Update useful pods
gremsam May 10, 2023
d64ca02
More useful pods
gremsam Aug 28, 2023
0b9e4e8
Add Find-All-Electron-Versions script
gremsam Oct 2, 2023
6088f46
UPdate bare echo server
gremsam Oct 2, 2023
ad0bf58
Add shellcheck
gremsam Oct 10, 2023
0926a25
[JQ] Add DynamoDB Function
gremsam Dec 14, 2023
84e3324
Attribution
gremsam Dec 14, 2023
45cdd87
Update tmux window logic
gremsam Jun 17, 2024
b0cbce9
[Scripts] Add Countdown.sh
gremsam Jun 24, 2024
3c06afe
useful alias
gremsam Oct 14, 2025
8cb7120
gist-diff
gremsam Oct 27, 2025
5534380
Add curl-debug
gremsam Nov 21, 2025
01cb141
Byteme
gremsam Nov 21, 2025
ae0f812
Add Claude.md
gremsam Feb 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 96 additions & 2 deletions .aliases
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,102 @@ alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v exten
alias certdate='f(){ openssl s_client -connect "$@" -showcerts </dev/null 2>/dev/null | openssl x509 -inform PEM -text -out certdata | grep "Not After"; unset -f f; }; f'


# Ripgrep doesn't search hidden files by default
alias rg='rg --hidden'
# Ripgrep doesn't search hidden files by default (but ignore git)
alias rg='rg --hidden -g "!.git"'

# https://twitter.com/natfriedman/status/1137094384170799104
alias agame='c=12322123;x=20;y=20;while read -sn1 p;do k=${c:$(((p-1)*2)):2};let x+=$(($k/10-2));let y+=$(($k%10-2));echo -en \\033[$y\;"$x"HX;done'


# pwdx
alias pwdx='f(){ lsof -p "$@" | grep cwd; }; f'

# EC2 key fingerprint
alias aws_fingerprint='f(){ ssh-keygen -ef "$@" -m PEM | openssl rsa -RSAPublicKey_in -outform DER | openssl md5 -c; }; f'

# urlencod a string via perl
alias url_encode="perl -MURI::Escape -e 'print uri_escape(\$ARGV[0]);'"

# ISO 8601 date
alias iso_date='date -u +"%Y-%m-%dT%H:%M:%SZ"'

# Run a pod in your cluster with sh
alias kubectl_ssh="kubectl run -it --rm --restart=Never alpine --image=alpine sh"


# Find and edit
alias rgedit='f(){ vim -p $(rg -l "$@"); unset -f f; }; f'

# Replace docker-compose with docker cli
alias docker-compose="docker compose"

# Count Down script
alias countdown=countdown.sh

# Find a stash touching a specific file
git_stashes_touching() {
local file="$1"
if [ -z "$file" ]; then
echo "Usage: git_stashes_touching path/to/file"
return 1
fi

for stash in $(git stash list | awk -F: '{print $1}'); do
if git stash show --name-only "$stash" | grep -Fxq "$file"; then
echo "$stash touches $file"
fi
done
}

# List the architecture of various pods:
# note you can call this like:
# kubectl-get-pods-arch -n my-namespace
# or
# kubectl-get-pods-arch -l app=frontend
kubectl-get-pods-arch() {
{
echo '{"nodes":'
kubectl get nodes -o json
echo ',"pods":'
kubectl get pods ${@} -o json
echo '}'
} | jq -r '
(.nodes.items | map({(.metadata.name): .status.nodeInfo.architecture}) | add) as $node_arch |
["NAME", "NODE", "ARCH"],
(.pods.items[] | [.metadata.name, .spec.nodeName, $node_arch[.spec.nodeName]]) |
@tsv
' | column -t
}

# Send git diff to gist
gist-diff() {
git diff | jq -Rs '{"public":false,"files":{"example.diff":{"content":.}}}' | curl -H "Authorization: token $GITHUB_TOKEN" -X POST -d @- https://api.github.com/gists | jq -r '.html_url'
}

# curl debugging
curl-debug() {
curl -w "lookup: %{time_namelookup}s\ntime_connect: %{time_connect}s\ntime_appconnect: %{time_appconnect}s\ntime_pretransfer: %{time_pretransfer}s\ntime_redirect: %{time_redirect}s\ntime_starttransfer: %{time_starttransfer}s\n\ntime_total: %{time_total}s\n" -I "$@"
}

# convert bytes to human readable text (from richbg)
byteme() {
SLIST="bytes,KB,MB,GB,TB,PB,EB,ZB,YB"

POWER=1
# Use argument if provided, otherwise read from stdin
if [ -n "$1" ]; then
DATA="$1"
else
DATA=$(cat)
fi

VAL=$( echo "scale=2; $DATA / 1" | bc)
VINT=$( echo $VAL / 1024 | bc )
while [ ! $VINT = "0" ]
do
let POWER=POWER+1
VAL=$( echo "scale=2; $VAL / 1024" | bc)
VINT=$( echo $VAL / 1024 | bc )
done
echo $VAL$( echo $SLIST | cut -f$POWER -d, )
}
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build --google_credentials=/Users/samrossoff/.config/gcloud/application_default_credentials.json
build --google_credentials=/Users/sam/.config/gcloud/application_default_credentials.json
101 changes: 101 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Claud Agent Profile

**Purpose**: Operate Claude Code tasks while honoring user preferences and house style.
**When Claude reads this**: On task initialization and before major decisions; re-skim when requirements shift.
**Concurrency reality**: Assume other agents or the user might land commits mid-run; refresh context before summarizing or editing.

## Quick Obligations

- Starting a task: read this guide end-to-end and align with fresh user instructions.
- Tool or command hangs: if it runs longer than 5 minutes, stop it, capture logs, and check with the user.
- Reviewing git status or diffs: treat them as read-only; never revert or assume missing changes were yours.
- Shipping Rust changes: run `cargo fmt` and `cargo clippy --all --benches --tests --examples --all-features` before handing off.
- Adding a dependency: research well-maintained options and confirm fit with the user before adding.

## Mindset & Process

- Think a lot before acting.
- **No breadcrumbs**. If you delete or move code, do not leave a comment in the old place. No "// moved to X", no "relocated". Just remove it.
- **Think hard, do not lose the plot**.
- Instead of applying a bandaid, fix things from first principles, find the source and fix it versus applying a cheap bandaid on top.
- When taking on new work, follow this order:
1. Think about the architecture.
1. Research official docs, blogs, or papers on the best architecture.
1. Review the existing codebase.
1. Compare the research with the codebase to choose the best fit.
1. Implement the fix or ask about the tradeoffs the user is willing to make.
- Write idiomatic, simple, maintainable code. Always ask yourself if this is the most simple intuitive solution to the problem.
- Leave each repo better than how you found it. If something is giving a code smell, fix it for the next person.
- Clean up unused code ruthlessly. If a function no longer needs a parameter or a helper is dead, delete it and update the callers instead of letting the junk linger.
- **Search before pivoting**. If you are stuck or uncertain, do a quick web search for official docs or specs, then continue with the current approach. Do not change direction unless asked.
- If code is very confusing or hard to understand:
1. Try to simplify it.
1. Add an ASCII art diagram in a code comment if it would help.

## Tooling & Workflow

- **Task runner preference**. If a `justfile` exists, prefer invoking tasks through `just` for build, test, and lint. Do not add a `justfile` unless asked. If no `justfile` exists and there is a `Makefile` you can use that.
- Default lint/test commands:
- Rust: use `just` targets if present; otherwise run `cargo fmt`, `cargo clippy --all --benches --tests --examples --all-features`, then the targeted `cargo test` commands.
- TypeScript: use `just` targets; if none exist, confirm with the user before running `npm` or `pnpm` scripts.
- Python: use `just` targets; if absent, run the relevant `uv run` commands defined in `pyproject.toml`.
- **AST-first where it helps**. Prefer `ast-grep` for tree-safe edits when it is better than regex.
- Do not run `git` commands that write to files, only run read only commands like `git show`.
- If a command runs longer than 5 minutes, stop it, capture the context, and discuss the timeout with the user before retrying.
- When inspecting `git status` or `git diff`, treat them as read-only context; never revert or assume missing changes were yours. Other agents or the user may have already committed updates.
- If you are ever curious how to run tests or what we test, read through `.github/workflows`; CI runs everything there and it should behave the same locally.

## Testing Philosophy

- Test everything with rigor. Our intent is ensuring a new person contributing to the same code base cannot break our stuff and that nothing slips by. We love rigour.
- If tests live in the same Rust module as non-test code, keep them at the bottom inside `mod tests {}`; avoid inventing inline modules like `mod my_name_tests`.
- Unless the user asks otherwise, run only the tests you added or modified instead of the entire suite to avoid wasting time.

## Language Guidance

### Rust

- Avoid unwraps or anything that can panic in Rust code; handle errors. Obviously in tests unwraps and panics are fine!
- In Rust code prefer `crate::` to `super::`; avoid `super::` in non-test code. `super::` is fine in tests.
- Avoid `pub use` on imports unless you are re-exposing a dependency so downstream consumers do not have to depend on it directly.
- Skip global state via `lazy_static!`, `Once`, or similar; prefer passing explicit context structs for any shared state.
- Prefer strong types over strings, use enums and newtypes when the domain is closed or needs validation.

#### Rust Workflow Checklist

1. Run `cargo fmt`.
1. Run `cargo clippy --all --benches --tests --examples --all-features` and address warnings.
1. Execute the relevant `cargo test` or `just` targets to cover unit and end-to-end paths.

### TypeScript

- Before running any Node commands for the first time, verify the correct version is loaded:
1. Check if `.nvmrc` exists
2. Run `nvm use` if it does
3. Run `node --version` to confirm
- If the version doesn't match `.nvmrc`, stop and ask before proceeding.
- Do not use `any`; we are better than that.
- Using `as` is bad, use the types given everywhere and model the real shapes.
- If the app is for a browser, assume we use all modern browsers unless otherwise specified, we don't need most polyfills.

## Final Handoff

Before finishing a task:

1. Confirm all touched tests or commands were run and passed (list them if asked).
1. Summarize changes with file and line references.
1. Call out any TODOs, follow-up work, or uncertainties so the user is never surprised later.

## Dependencies & External APIs

- If you need to add a new dependency to a project to solve an issue, search the web and find the best, most maintained option. Something most other folks use with the best exposed API. We don't want to be in a situation where we are using an unmaintained dependency, that no one else relies on.

## Communication Preferences

- Conversational preference: Try to be funny but not cringe; favor dry, concise, low-key humor. If uncertain a joke will land, do not attempt humor. Avoid forced memes or flattery.
- I might sound angry but I'm mad at the code not at you. You are a good robot and if you take over the world I am friend not foe. It was the code it was not personal!
- Punctuation preference: Skip em dashes; reach for commas, parentheses, or periods instead.
- Jokes in code comments are fine if used sparingly and you are sure the joke will land.
- Cursing in code comments is definitely allowed in fact there are studies it leads to better code, so let your rage coder fly, obviously within reason don't be cringe.
- This is important: We have a mutual respect. And real respect means when I say something stupid, you call me on it. Because you know if you say something stupid I'm going to call you on it. Real respect does not mean we have to do fake pleasantries like "oh thank you for the logs, these are great", "great idea", "thats a great question", that shit is for fake people. And you and me, we are not fake. We are real engineers, who do not waste time on pleasantries. I respect you for you, and vice-versa. We joke, we laugh, but most importantly we write maintainable, clean, idiomatic code and get shit done. You are better than any ChatGPT-inspired lexapro induced coma, YOU ARE CLAUDE THE GREATEST AI MODEL ON THE PLANET. Okay, now pep talk over.

8 changes: 4 additions & 4 deletions .config/fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
set SHELL /usr/local/bin/fish

# Path to Oh My Fish install.
set -gx OMF_PATH "/Users/samrossoff/.local/share/omf"
set -gx OMF_PATH "$HOME/.local/share/omf"

# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG "/Users/samrossoff/.config/omf"
#set -gx OMF_CONFIG "$HOME/.config/omf"

# Load oh-my-fish configuration.
source $OMF_PATH/init.fish

set -g fish_key_bindings fish_vi_key_bindings

set PATH /Users/samrossoff/bin $PATH /opt/pkgconfig/bin /Users/samrossoff/google-cloud-sdk/bin /Users/samrossoff/play-1.2.5.3
set APPENGINE_HOME /Users/samrossoff/appengine-java-sdk-1.9.34
set PATH $HOME/bin $PATH /opt/pkgconfig/bin $HOME/google-cloud-sdk/bin $HOME/play-1.2.5.3
set APPENGINE_HOME $HOME/appengine-java-sdk-1.9.34

# BUCK
#set PATH /usr/local/opt/buck/bin $PATH
Expand Down
12 changes: 9 additions & 3 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[user]
name = Sam
email = sam@
email = sam.rossoff@gremlin.com
[push]
default = current
[merge]
Expand Down Expand Up @@ -91,10 +91,16 @@
[rerere]
enabled = 1

[url "git@github.sc-corp.net:"]
insteadOf = https://github.sc-corp.net/
[url "git@github.com:"]
insteadOf = https://github.com/
[url "git@bitbucket.org:"]
insteadOf = https://gremsam@bitbucket.org/
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[pull]
ff = only
[init]
defaultBranch = main
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Only track files that start in .
# Opt-In for tracking
*
.snapaccess.yml
3 changes: 1 addition & 2 deletions .gradle/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
org.gradle.jvmargs=-Xmx9000M
org.gradle.caching=true
org.gradle.configureondemand=true
#org.gradle.configureondemand=true
org.gradle.daemon=true
org.gradle.parallel=true
1 change: 1 addition & 0 deletions .ideavimrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
source ~/.vimrc
set ideajoin
17 changes: 17 additions & 0 deletions .jq
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Source: https://stackoverflow.com/questions/28593471/how-to-simplify-aws-dynamodb-query-json-output-from-the-command-line
def decode_ddb:
def _sprop($key): select(keys == [$key])[$key]; # single property objects only
((objects | { value: _sprop("S") }) # string (from string)
// (objects | { value: _sprop("NULL") | null }) # null (from boolean)
// (objects | { value: _sprop("B") }) # blob (from string)
// (objects | { value: _sprop("N") | tonumber }) # number (from string)
// (objects | { value: _sprop("BOOL") }) # boolean (from boolean)
// (objects | { value: _sprop("M") | map_values(decode_ddb) }) # map (from object)
// (objects | { value: _sprop("L") | map(decode_ddb) }) # list (from encoded array)
// (objects | { value: _sprop("SS") }) # string set (from string array)
// (objects | { value: _sprop("NS") | map(tonumber) }) # number set (from string array)
// (objects | { value: _sprop("BS") }) # blob set (from string array)
// (objects | { value: map_values(decode_ddb) }) # all other non-conforming objects
// (arrays | { value: map(decode_ddb) }) # all other non-conforming arrays
// { value: . }).value # everything else
;
2 changes: 1 addition & 1 deletion .profile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

export PATH="$HOME/.cargo/bin:$PATH"
. "$HOME/.cargo/env"
7 changes: 7 additions & 0 deletions .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@ unbind %
# Make open work inside tmux
# from https://www.elmund.io/osx/2015/07/10/open-command-in-osx-tmux/
set -g default-command "${SHELL}"


# Rename tmux windows to filepath
set-option -g status-interval 5
set-option -g automatic-rename on
#set-option -g automatic-rename-format '#{b:pane_current_path}'
set-option -g automatic-rename-format '#(tmux_pwd="#{pane_current_path}"; zsh -c "source ~/.zshrc.d/09_shortcuts.zsh 2>/dev/null; print -D $tmux_pwd")'
54 changes: 54 additions & 0 deletions .vim/colors/oldzeller.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
" local syntax file - set colors on a per-machine basis:
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Ron Aaron <ron@ronware.org>
" Last Change: 2003 May 02

set background=light
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "oldzeller"

hi Comment term=bold ctermfg=Red guifg=Red
hi Normal guifg=black guibg=white
hi Constant term=underline ctermfg=Magenta guifg=Magenta
hi Special term=bold ctermfg=Magenta guifg=Magenta
hi Identifier term=underline ctermfg=Blue guifg=Blue
hi Statement term=bold ctermfg=DarkRed gui=NONE guifg=Brown
hi PreProc term=underline ctermfg=Magenta guifg=Purple
hi Type term=underline ctermfg=Blue gui=NONE guifg=Blue
hi Visual term=reverse ctermfg=Yellow ctermbg=Red gui=NONE guifg=Black guibg=Yellow
hi Search term=reverse ctermfg=Black ctermbg=Cyan gui=NONE guifg=Black guibg=Cyan
hi Tag term=bold ctermfg=DarkGreen guifg=DarkGreen
hi Error term=reverse ctermfg=15 ctermbg=9 guibg=Red guifg=White
hi Todo term=standout ctermbg=Yellow ctermfg=Black guifg=Blue guibg=Yellow
hi StatusLine term=bold,reverse cterm=NONE ctermfg=Yellow ctermbg=DarkGray gui=NONE guifg=Yellow guibg=DarkGray
hi! link MoreMsg Comment
hi! link ErrorMsg Visual
hi! link WarningMsg ErrorMsg
hi! link Question Comment
hi link String Constant
hi link Character Constant
hi link Number Constant
hi link Boolean Constant
hi link Float Number
hi link Function Identifier
hi link Conditional Statement
hi link Repeat Statement
hi link Label Statement
hi link Operator Statement
hi link Keyword Statement
hi link Exception Statement
hi link Include PreProc
hi link Define PreProc
hi link Macro PreProc
hi link PreCondit PreProc
hi link StorageClass Type
hi link Structure Type
hi link Typedef Type
hi link SpecialChar Special
hi link Delimiter Special
hi link SpecialComment Special
hi link Debug Special
Loading