Skip to content

Instantly share code, notes, and snippets.

@mallendeo
Last active November 14, 2018 15:38
Show Gist options
  • Save mallendeo/04fce0b534c8dd7455782060b82098d0 to your computer and use it in GitHub Desktop.
Save mallendeo/04fce0b534c8dd7455782060b82098d0 to your computer and use it in GitHub Desktop.
Useful commands
# Batch resize and rename images
for x in *.png; do root=`echo $x | sed -e "s/.png//"`; convert $x -resize 200x200 ${root}-200x200.png; done
for x in *.jpg; do root=`echo $x | sed -e "s/.jpg//"`; convert $x -resize 48x48 ${root}-48x48.jpg; done
# Create Sierra USB Install Disk
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia \
--volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ Sierra.app
## Linux
# Get OS install date
sudo dumpe2fs $(mount | grep 'on \/ ' | awk '{print $1}') | grep 'Filesystem created:'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment