Skip to content

Instantly share code, notes, and snippets.

View cheshire137's full-sized avatar

Sarah Vessels cheshire137

View GitHub Profile
@cheshire137
cheshire137 / cheshireface.png
Last active March 19, 2019 21:49
Hello world
cheshireface.png
@cheshire137
cheshire137 / test.txt
Created March 22, 2019 16:43
test gist
hello
@cheshire137
cheshire137 / 🎵 My Spotify Top Tracks
Last active January 10, 2022 00:01
🎵 My Spotify Top Tracks
RAINY NIGHT IN TALLINN Ludwig Goransson
Secret Clark
Lambent Rag Clark
THE PLAN Travis Scott
Citrus Clark
FREEPORT Ludwig Goransson
RED ROOM BLUE ROOM Ludwig Goransson
WINDMILLS Ludwig Goransson
Small Clark & Nathaniel
Olson Boards of Canada
@cheshire137
cheshire137 / run-workflow-for-recent-prs.sh
Last active February 15, 2024 17:19
Script to trigger a GitHub Actions workflow for each pull request in a list
#!/usr/bin/env bash
for item in $(gh pr list --assignee cheshire137 --repo someUser/someRepo --state open --json headRefName,number,headRepository,headRepositoryOwner --search "updated:>=$(date -Idate)" --jq ".[]"); do
number=$(jq --raw-output '.number' <<< "$item")
headRefName=$(jq --raw-output '.headRefName' <<< "$item")
repoName=$(jq --raw-output '.headRepository.name' <<< "$item")
repoOwner=$(jq --raw-output '.headRepositoryOwner.login' <<< "$item")
echo "$repoOwner/$repoName#$number $headRefName"
read -r -p "Run workflow? [Y/n] " response
response=${response,,} # tolower
@cheshire137
cheshire137 / useful-commands.sh
Last active April 18, 2024 21:40
Handy commands I forget and want to copy-paste periodically
# hot-reload a Go server, ty @zerowidth
# see https://github.com/eradman/entr
find . -name '*.go' | entr -r -c go run . server
# look for files that match two patterns
grep -rl --include \*.rb --exclude-dir=vendor --exclude-dir=test "pattern the first" . | xargs grep "pattern the second"
# generate a Markdown todo list of file paths
some_command_outputting_a_list_of_file_paths | xargs grep -l "some pattern within some of the files" | awk '$0="- [ ] "$0'