Skip to content

Instantly share code, notes, and snippets.

@blesson3
blesson3 / find-pis.sh
Created December 20, 2021 21:11
relatively quick script to find raspberry pis on your current network; built for macos, requires root
#!/usr/bin/env bash
# Find RaspberryPis on your network.
#
# Usage: ./find-pis.sh <iface:default en0>
#
# raspberry pi mac addresses
# source: https://maclookup.app/search/vendors/results?vendor=Raspberry+Pi
# - https://maclookup.app/vendors/raspberry-pi-foundation
@blesson3
blesson3 / Git change author
Created July 10, 2017 21:16
Changes an author on all commits using a bad/old email address
# WARNING: rewrites all commits (different SHAs)
$ git filter-branch -f --env-filter '
WRONG_EMAIL="bad@email.com"
NEW_NAME="username"
NEW_EMAIL="good@email.com"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then