Skip to content

Instantly share code, notes, and snippets.

View craigbalding's full-sized avatar

Craig B craigbalding

  • London, England
View GitHub Profile
@craigbalding
craigbalding / crumber.sh
Last active January 5, 2024 10:14
Chrome profile history searcher & launcher for MacOS
crumber() {
# search_term is a URL fragment for a website you visited already, but can't remember in which chrome profile
search_term=$1
chrome_base_path=~/Library/Application\ Support/Google/Chrome
profile_dirs=$(ls "$chrome_base_path" | grep -E '^Default$|^Profile [0-9]+|^Guest Profile$')
# Create a temporary file to hold URL and profile pairs
tmpfile=$(mktemp)
echo "$profile_dirs" | while IFS= read -r profile; do
#!/bin/bash
# Kill all my running EC2 instances at Amazon AWS - all regions
. ~/.ec2/env
cat <<EOF | while read EC2_URL
https://eu-west-1.ec2.amazonaws.com
https://ec2.us-east-1.amazonaws.com
https://ec2.us-west-1.amazonaws.com
https://ec2.ap-southeast-1.amazonaws.com
EOF
do