How to erase a rewritable CD or DVD in OS X

Its rather simple actually.
Insert the CD or DVD into the SuperDrive
You should see an icon appear on the desktop like when you mount any other drive.
Simply right click on the icon and choose erase.
 

NOTE: I’ve had OS X not recognise a DVD and only give me the Ignore and Eject options. If I choose the Ignore option I don’t get an icon to be able to do the steps above. I haven’t worked out what to do there yet. Possibly something with diskutil from terminal……

How to run a shell script in OS X by double-clicking

  • First in terminal make the script executable by typing:
    chmod a+x (yourscriptname)

 

  • Then, in Finder, right-click your file and select “Open with” and then “Other…”.

 

  • Here you select the application you want the file to execute into, in this case it would be Terminal.
  • To be able to select terminal you need to switch from “Recommended Applications” to “All Applications”.
    NOTE: The Terminal.app application can be found in the Utilities folder

 

  • If you want this to be the default behaviour from now on, check the “Always Open With” box.
  • After clicking OK you should be able to execute you script by simply double-clicking it.

Setting the hostname on your Mac

Setting the hostname on your Mac using scuttle

  1. Open a terminal.
  2. Type the following command to change the primary hostname of your Mac:
    sudo scutil –set HostName <new host name>
  3. Type the following command to change the Bonjour hostname of your Mac:
    sudo scutil –set LocalHostName <new host name>
  4. Optional: If you also want to change the computer name, type the following command:
    sudo scutil –set ComputerName <new name>
Like this:
 sudo scutil --get HostName
 sudo scutil --get LocalHostName
 sudo scutil --get ComputerName

How to automount an SMB share in Mac OS X

How to automount an SMB share in Mac OS X

  1. Connect to your network share, in Finder, Select Go, then Connect to server
  2. Enter the credentials for your login to your network drive and tick the ‘remember in keychain’
  3. Open system settings, select users and groups then click on login items
  4. Drag the icon for your network drive from your desktop to the startup items.