Skip to content

Instantly share code, notes, and snippets.

@Raefael
Raefael / OS X - install AirportUtility
Last active October 13, 2015 23:28
Install AirPort Utility 5.6.1 on Mountain Lion via Terminal
##
# Installing Airport Utility 5.6 via the terminal on Mountain Lion
##
mkdir ~/Downloads/tmp
cd ~/Downloads/tmp
curl -OL http://support.apple.com/downloads/DL1482/en_US/AirPortUtility56.dmg
hdiutil attach AirPortUtility56.dmg
xar -x -f /Volumes/AirPortUtility/AirPortUtility56.pkg Payload
gzcat AirPortUtility56Lion.pkg/Payload | tar -xf -
@Raefael
Raefael / OS X - colorized .bash_profile
Last active December 15, 2015 08:29
OS X - colorized .bash_profile
##
# Simple colorized bash on Mountain Lion
##
# tell ls to be colourful
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
# tell grep to highlight matches
export GREP_OPTIONS='--color=auto'
# alias
# hide file or folder
chflags -hidden "path to file or folder"
# show file or folder
chflags -nohidden "path to file or folder"
# show all hidden files or folders
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
# shows you the actuall settings
# you'll see the autopoweroff set to '1' and autopoweroffdelay set to 14400
#
pmset -g | grep autopoweroff
# turn outopower off
sudo pmset -a autopoweroff 0
# turn outopower on
sudo pmset -a autopoweroff 14400
@Raefael
Raefael / Repair a locked iPhoto Library
Created May 13, 2013 11:30
repair a locked iPhoto Library
# If the Library is on a Time Capsule
disconnect all users from the TC
disconnect the TC
# generall options
Option 1
Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
 
If that fails:
@Raefael
Raefael / Remove duplicate "Open With" entries in Mac OS X
Last active December 17, 2015 13:38
Remove duplicate "Open With" entries in Mac OS X
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
@Raefael
Raefael / disable_OS-X_startup_chime
Created May 21, 2013 07:53
Disable OS X startup chime
# turns off the startup chime
sudo nvram SystemAudioVolume=%80
# turn on the startup chime
sudo nvram SystemAudioVolume=&@
@Raefael
Raefael / Disable IPv6 in OS X Lion
Created May 21, 2013 10:03
Disable IPv6 in OS X Lion
networksetup -listallnetworkservices
#To disable IPv6 for wireless, issue the following command:
networksetup -setv6off Wi-Fi
#to disable IPv6 for Ethernet, issue the following command:
networksetup -setv6off Ethernet
#To re-enable IPv6, use
-setv6automatic instead
@Raefael
Raefael / enable_MAS_debug_menue
Created May 24, 2013 11:45
Enable MAS Debug Menue
#Enable MAS Debug Menue
defaults write com.apple.appstore ShowDebugMenu -bool true
@Raefael
Raefael / roll_a_dice
Created May 31, 2013 07:12
Roll a dice in bash or zsh
# rolling a w6 dice on the terminal
echo $[RANDOM%6+1]