Skip to content

Instantly share code, notes, and snippets.

View packetpilot's full-sized avatar

dc packetpilot

  • nowhere, VA via Mountain View/NYC/Bangkok
  • 15:00 (UTC -04:00)
View GitHub Profile
@packetpilot
packetpilot / [bash, not zsh] Convert an ALL CAPS list (or csv etc) to Just First Letter Capitalized
Last active August 2, 2018 18:44
[bash] Convert an ALL CAPS list (or csv etc) to Just First Letter Capitalized
bash-4.4$ cat CAPSTITLES
SR IMPORTANT PERSON
JR SOMETHING OTHERTHING
DIR JANITORIAL
HEAD OF ALL NECKS
PLEB
SEÑOR DIVERSITY ADVOCATE
SR. PERIOD TESTER
LEAD, PUNCTUATION TESTERS
WOULD,THIS,WORK,ON,A,CSV?
@packetpilot
packetpilot / Search for service account identifier across all GCP projects
Created August 3, 2018 01:44
Search for service account identifier across all GCP projects
# this slow-and-dirty one-liner has been split for readability
for p in $(gcloud projects list | cut -d ' ' -f 1 | grep -v PROJECT_ID); do \
gcloud config set project "${p}" && \
echo "${p}:" && \
gcloud iam service-accounts list \
| grep '12345678901'; \
done
@packetpilot
packetpilot / pubess
Created August 8, 2019 19:57
pubkey external sync script
#!/bin/bash
#######################################
# pubess: PUBkey External Sync Script #
#######################################
## ships "with the safety on" [L{40,42}]
# !! be sure to set your username here !!
# if you don't, the author considers it an invitation to visit.