Skip to content

Instantly share code, notes, and snippets.

View cheshire137's full-sized avatar

Sarah Vessels cheshire137

View GitHub Profile
cheshire137 /
Created April 4, 2024 15:43
Handy commands I forget and want to copy-paste periodically
# hot-reload a Go server, ty @zerowidth
# see
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"
cheshire137 /
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 '' <<< "$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 / 🎵 My Spotify Top Tracks
Last active January 10, 2022 00:01
🎵 My Spotify Top Tracks
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 / test.txt
Created March 22, 2019 16:43
test gist
cheshire137 / cheshireface.png
Last active March 19, 2019 21:49
Hello world
cheshire137 /
Last active June 24, 2016 16:30
Find all the Git commits that modified a particular line in a file.
# Sample use:
# PATTERN="\"/some-route\"" FILE=config/routes.rb ~/bin/
# Thanks to mikedillion <> for the basis of this!
set -e
cheshire137 / city_aliaser.rb
Last active March 13, 2019 17:27
List of aliases for US cities by state
#!/usr/bin/env ruby
require 'rubygems'
require 'mechanize'
require 'json'
url = ""
STATES = ["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado",
"Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho",
"Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana",
"Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota",
cheshire137 /
Last active November 8, 2017 16:38
Proof for my identity.

Keybase proof

I hereby claim:

  • I am cheshire137 on github.
  • I am cheshire137 ( on keybase.
  • I have a public key ASCYDtNML3BizFS2gSmgo_2osYnXm9sWQTp748en-luS6go

To claim this, I am signing this object:

cheshire137 / git-cherry-pick-shas.js
Created September 24, 2015 22:01
Get cherry-pick commands for shas linked on a Github page
// 1. Go to a URL like
// 2. Open up your browser JavaScript console.
// 3. Paste the command below.
// Now you have git cherry-pick commands for making a branch of those commits!
var commands = '';jQuery('a.sha').each(function() { var url = $(this).attr('href'); var sha = url.split('/commit/')[1]; commands += 'git cherry-pick ' + sha + "\n"; }); console.log(jQuery.trim(commands));
cheshire137 / ronaldchase.rb
Created September 10, 2015 14:51
What does 'rc' stand for in all those .*rc files anyway? Why not Ronald Chase?
#!/usr/bin/env ruby
require 'fileutils'
path = File.expand_path('~/.*rc')
Dir[path].each do |file|
next unless File.file?(file)
destination = file.gsub(/rc$/, 'ronaldchase')
puts "#{file} -> #{destination}"
FileUtils.ln_s(file, destination)