Skip to content

Instantly share code, notes, and snippets.

@wbs75
wbs75 / .aliases
Last active February 7, 2019 01:29
aliases
# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
# Shortcuts
alias d="cd ~/Documents/Dropbox"
@wbs75
wbs75 / myCleanupRepair.sh
Created June 8, 2013 17:28
OSX Mtn Lion script to cleanup and repair permissions on Boot Drive.
#!/bin/bash
echo "asl cleanup..."
find . -name '*.DS_Store' -type f -ls -delete >/dev/null
echo "deleting Flash Cache..."
dscacheutil -flushcache >/dev/null
echo 'Cleaning ASL files...\c';sudo -S find -d /var/log/asl -name "AUX*" -exec rm -fr {} \;;sudo -S find -d /var/log/asl -name "*\.asl" -exec rm -fr {} \;;sudo -S find /var/log/DiagnosticMessages/ -name "*\.asl";sudo -S ls -@ailO /var/log/asl /var/log/DiagnosticMessages;echo;echo done.
#!/bin/bash
$ rbenv install 1.9.3-p194
$ rbenv global 1.9.3-p194
$ gem install bundler
$ gem install berkshelf
@wbs75
wbs75 / MtnLionDefaults.sh
Last active January 12, 2017 06:29
OSX 10.8 defaults
#!/bin/bash
# ~/.osx — https://github.com/wbs75/dotfiles/edit/master/.osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@wbs75
wbs75 / SSDTweaks.sh
Last active September 30, 2022 22:19
My OSX SSD Tweaks
#!/bin/bash
sudo -v
# Disable Hibernation
sudo pmset -a hibernatemode 0
# Disable Wake from Lid Open
sudo pmset lidwake 0
@wbs75
wbs75 / SkipAppleSetup
Last active October 11, 2015 23:28
Skip Apple Setup & Log-in as "Root"
#!/bin/bash
mount -uw /
touch /Volumes/Macintosh\ HD/private/var/db/.AppleSetupDone
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
sudo -s