Skip to content

Instantly share code, notes, and snippets.

@yusukei
Created February 5, 2011 15:25
Show Gist options
  • Save yusukei/812523 to your computer and use it in GitHub Desktop.
Save yusukei/812523 to your computer and use it in GitHub Desktop.
MaxOSX LoginHook
sudo defaults write com.apple.loginwindow LoginHook /etc/rc.local
#!/bin/bash
# once
#sudo unlink /tmp
#sudo ln -s /Volumes/ramdisk /tmp
# Make RamDisk
if [ ! -d /Volumes/ramdisk ]
then
mtpoint="$(hdid -nomount ram://524288)"
diskutil eraseDisk HFS+ ramdisk $mtpoint
SetFile -a V /Volumes/ramdisk
fi
# for SSD
mount -u -o noatime /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment