Quick tips

Good guides to OSX setup

For those who was OSX to be tweaked for software development to the nth degree, there is an in-depth guide to setting us OSX here http://sourabhbajaj.com/mac-setup/.

There is also some good stuff here https://gist.github.com/kevinelliott/0726211d17020a6abc1f

There is an excellent guide to privacy/security on OSX here https://github.com/drduh/OS-X-Yosemite-Security-and-Privacy-Guide/blob/master/README.md

Screenshots

Screenshots well covered at https://www.ihash.eu/2014/10/create-screenshot-print-screen-os-x-10-10-yosemite/

Solarized themes with iTerm2

iTerm2 themes can be found at: http://iterm2colorschemes.com

You also need to go iTerm -> Preferences -> Profiles -> Text -> Text Rendering and untick ‘Draw bold text in bright colors’.

From http://www.mseri.me/on-iterm2-and-solarized-dark/

Index NFS shares so they are covered with Spotlight

Note you may have to use sudo for these.

To enable spotlight indexing on a network drive (where ‘name’ is the name of the drive)

mdutil /Volumes/name -i on

To disable spotlight indexing on a network drive (where ‘name’ is the name of the drive)

mdutil /Volumes/name -i off

To check if turned on or off

mdutil /Volumes/name -s

From here

## Install proper software easily with a package manager ##

  • Download brew http://brew.sh
  • Download Xcode from Appstore
  • Run Xcode and accept license

By way of example:

brew doctor
brew install vim && brew install macvim
brew linkapps
brew install wget tmux unrar pandoc youtube-dl fortune 

Source re: macvim

In my view, brew is a killer app for OSX – it allows a good deal of open source software to be installed very easily.

Furthermore, it seriously extends the functionality of an old OS, e.g. if you are stuck with OSX Lion on a MacPro 1,1

Make terminal look nice

Black on a white background … argh! Fear not though:

Download from BBC iplayer with Get iPlayer Automater

There exists a lovely app called Get iPlayer Automater for OSX which essentially does the same as get_iplayer but with a GUI, the dependencies rolled in, and in a just works fashion.

Mission Control also previously known as Spaces

Usenet based piracy

Newshosting have a very easy to use OSX client for downloading nzbs.

Open GUI apps from the shell

To open an GUI program from the terminal, use ‘open -a’ e.g.

	$ open -a VLC VIDEO_TS

Sort /etc/hosts

To sort /etc/hosts to block a good deal of ads:

	$ sudo bash
	# curl 'http://someonewhocares.org/hosts/hosts' >> /etc/hosts 
	# exit

pandoc / pdflatex

For latex or pandoc PDF output you will want MacTEX http://www.tug.org/mactex/downloading.html You will also need to tweak your path if you want pandoc to see pdflatex

	$ export PATH=$PATH":/usr/texbin"

afplay

OSX contains a shell application called afplay to play music, which is handy if you are downloading e.g. an mp3 mix and want to listen to it as it is downloading. Obviously one could use vlc for this, but afplay is included by default.

Turn off auto updates

Actually quite easy to do in Yosemite at least: go to System Preferences > App Store > Uncheck ‘Automatically Check for Updates’

Disable a user without deleting profile

    $ pwpolicy -u G -setpolicy isDisabled=1

Bits and bobs

I have found the below bits and bobs useful for OSX at one time or another.

Sort out right click
http://osxdaily.com/2011/05/24/enable-right-click-mac/

Resize columns in Finder
http://apple.stackexchange.com/questions/34795/how-can-i-change-the-default-width-of-finder-columns

Add spaces to dock
http://osxdaily.com/2011/01/19/add-a-spacer-to-the-mac-os-x-dock/

SSH private key in keychain not working
http://apple.stackexchange.com/questions/18458/password-dialog-appears-when-ssh-private-key-permissions-are-set-to-0600

Convert m4a to mp3 in iTunes
http://osxdaily.com/2009/12/03/convert-m4a-to-mp3/

Stop iTunes opening when you put a CD in
https://apple.stackexchange.com/questions/57493/stop-itunes-from-opening-when-a-device-is-plugged-in

Enable root login
http://superuser.com/questions/555810/how-do-i-ssh-login-into-my-mac-as-root

Change UID
http://apple.stackexchange.com/questions/98775/how-do-you-change-your-uid-in-os-x-mountain-lion

Launch GUI apps from the terminal
http://osxdaily.com/2007/02/01/how-to-launch-gui-applications-from-the-terminal/

X11 forwarding
http://dyhr.com/2009/09/05/how-to-enable-x11-forwarding-with-ssh-on-mac-os-x-leopard/

Uninstalling brew
http://dev.enekoalonso.com/2011/08/09/uninstalling-brew-so-i-can-reinstall/

Add Music to iPhone or iPod Wirelessly Without Syncing iTunes http://osxdaily.com/2012/12/09/add-music-to-iphone-or-ipod-wirelessly-without-syncing-itunes/

Toggle full screen mode
http://lifehacker.com/5851881/easily-navigate-in-and-out-of-full-screen-mode-in-os-x-with-this-shortcut

Lookup macs by serial number, model number etc
http://www.everymac.com/ultimate-mac-lookup/

Add a private key to OSX keychain
https://wiki.hpcc.msu.edu/display/hpccdocs/Adding+a+Private+Key+to+Your+Mac+OSX+Keychain