Skip to content

Instantly share code, notes, and snippets.

View mikemilla's full-sized avatar

Mike Miller mikemilla

View GitHub Profile
@mikemilla
mikemilla / ipqr.sh
Last active December 22, 2022 05:20
Script to generate local mac IP as a QR code
#!/bin/bash
# Check if qrencode is installed
if ! [ -x "$(command -v qrencode)" ]; then
# Install qrencode if it is not installed
brew install qrencode
fi
# Find the local IP address of the Mac
ip_address=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}')