User Tools

Site Tools


dev:tricks:macos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
dev:tricks:macos [2013/09/09 05:50] – [F11 on a Mac for ESX Installs] hackerzhoudev:tricks:macos [2016/04/19 08:48] – [Create a bootable OS X USB installation disk] hackerzhou
Line 1: Line 1:
 ====== Mac OS Tricks ====== ====== Mac OS Tricks ======
 +==== Change the hostname ====
 +<code bash>
 +sudo scutil --set HostName testhostname.local
 +hostname
 +</code>
 +
 +==== Create a bootable OS X USB installation disk ====
 +<code bash>
 +sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction
 +</code>
 +
 ==== F11 on a Mac for ESX Installs ==== ==== F11 on a Mac for ESX Installs ====
 <code> <code>
Line 7: Line 18:
 </code> </code>
 ==== Install Homebrew ==== ==== Install Homebrew ====
-<code>+<code bash>
 ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
 brew doctor brew doctor
Line 14: Line 25:
  
 ==== Mount from directory to directory ==== ==== Mount from directory to directory ====
-<code>+<code bash>
 brew install bindfs brew install bindfs
 # brew install pkg-config if needed # brew install pkg-config if needed
 bindfs <src_directory> <dest_directory> bindfs <src_directory> <dest_directory>
 +</code>
 +
 +==== Install useful unix utility ssh-copy-id ====
 +<code bash>
 +curl -L https://raw.githubusercontent.com/beautifulcode/ssh-copy-id-for-OSX/master/install.sh | sh
 +</code>
 +
 +==== Schedule tasks in Mac OS X ====
 +<code>
 +cat >> ~/me.hackerzhou.backup.plist <<EOF
 +<?xml version="1.0" encoding="UTF-8"?>
 +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 +<plist version="1.0">
 +<dict>
 +     <key>Label</key>
 +     <string>me.hackerzhou.backup</string>
 +        <key>ProgramArguments</key>
 +        <array>
 +                <string>/Users/hackerzhou/bin/backup.sh</string>
 +        </array>
 +     <key>StartCalendarInterval</key>
 +     <dict>
 +          <key>Minute</key>
 +          <integer>0</integer>
 +     </dict>
 +</dict>
 +</plist>
 +EOF
 +sudo cp /Users/hackerzhou/me.hackerzhou.backup.plist /Library/LaunchDaemons/
 +sudo launchctl load /Library/LaunchDaemons/me.hackerzhou.backup.plist
 +</code>
 +
 +==== Use Time Machine via NFS ====
 +<code>
 +http://smekkley.wordpress.com/2014/01/18/time-machine-via-nfs-on-mavericks/
 +http://images.apple.com/business/docs/Autofs.pdf
 +http://tentacles666.wordpress.com/2013/10/27/nfs-mounts-in-os-x-mavericks/
 </code> </code>
dev/tricks/macos.txt · Last modified: 2020/06/06 23:32 by 127.0.0.1