Skip to content

Instantly share code, notes, and snippets.

View agraves's full-sized avatar

Aaron Graves agraves

  • New York, NY
View GitHub Profile
@emiller
emiller / git-mv-with-history
Last active October 15, 2024 14:08
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@wcharczuk
wcharczuk / setmacaddr.sh
Created March 28, 2013 12:37
Programatically set your mac address
#!/bin/sh
echo "Setting MAC Address ..."
networksetup -setairportpower en1 on;
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z
/sbin/ifconfig en1 ether YOUR_MAC_ADDRESS_HERE
networksetup -detectnewhardware
echo "Done!"