MacOS Tips
# Annoying Notification of Updates
If you want to disable updates for specific apps, you can use
```
softwareupdate --ignore.
```
Do all the following in Terminal
Start with
```
softwareupdate -l
```
to list all available updates,
```
defaults read /Library/Preferences/com.apple.SoftwareUpdate.plist
```
to find the Identifier of the app you want to ignore, and then
```
softwareupdate --ignore 'Identifier'
```
to ignore the update. Should disappear from Software Updates in System Preferences immediately.
# TeX on MacOS
basic installtion
~~~
brew cask install basictex
brew install ghostscript ## useful tools for pdf
sudo tlmgr update --self --all ## update tex tools
~~~
optional
~~~
brew cask install latexit
sudo tlmgr install tabu ## install tabu.sty
~~~
# ~/Library on MacOS
`~/Library` is hidden dir
unix command
`$ locate`
cannot search these hidden directories
even though erase db and rebuild it.
so type to switch
~~~
chflags nohidden ~/Library/
chflags hidden ~/Library/
~~~
# change MAC Address
~~~
$ ifconfig > .macaddress
# /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z
# ifconfig en0 ether XX:XX:XX:XX:XX:XX
# exit
$ networksetup -detectnewhardware
~~~
# brew Tips
## ffmpeg with ffplay
~~~
brew instlal ffmpeg --with-ffplay
~~~
~~~
## disable /Volumes/MobileBackUps (Insurance for Timemachine)
sudo tmutil disablelocal
~~~
~~~
## change Hostnames on Terminal
sudo scutil --set ComputerName "newname"
sudo scutil --set LocalHostName "newname"
sudo scutil --set HostName "newname"
~~~
# setting up from new
~~~
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git zsh tree tmux mlocate
brew cask install osxfuse
brew install sshfs
~~~
~~~
## attach ssh files && install dotfiles
## open System Preferences > Users and Groups > Advanced Options > change shell
~~~
Haskell OCaml
~~~
brew install opam stack
opam init
stack install ghci --install-ghc
~~~
ruby
~~~
$ brew uninstall ruby
$ brew install rbenv
$ rbenv init ## set path, ..etc
$ rbenv install 2.4.2
$ rbenv global 2.4.2
$ gem install jekyll ## we do not need sudo anymore.
~~~
# SIP
## disable
1. reboot with pressing command+R
2. open terminal
~~~
csrutil disable; reboot
~~~
## enalbe
~~~
csrutil enable; reboot
~~~
# camera
## disable camera
1. Back up & Disable SIP
2. type in terminal
~~~
sudo chmod a-r /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/Resources/VDC.plugin/Contents/MacOS/VDC
sudo chmod a-r /System/Library/PrivateFrameworks/CoreMediaIOServicesPrivate.framework/Versions/A/Resources/AVC.plugin/Contents/MacOS/AVC
sudo chmod a-r /System/Library/QuickTime/QuickTimeUSBVDCDigitizer.component/Contents/MacOS/QuickTimeUSBVDCDigitizer
sudo chmod a-r /Library/CoreMediaIO/Plug-Ins/DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera
sudo chmod a-r /Library/CoreMediaIO/Plug-Ins/FCP-DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera
~~~
3. Enable SIP
## enable camera
~~~
sudo chmod a+r /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/Resources/VDC.plugin/Contents/MacOS/VDC
sudo chmod a+r /System/Library/PrivateFrameworks/CoreMediaIOServicesPrivate.framework/Versions/A/Resources/AVC.plugin/Contents/MacOS/AVC
sudo chmod a+r /System/Library/QuickTime/QuickTimeUSBVDCDigitizer.component/Contents/MacOS/QuickTimeUSBVDCDigitizer
sudo chmod a+r /Library/CoreMediaIO/Plug-Ins/DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera
sudo chmod a+r /Library/CoreMediaIO/Plug-Ins/FCP-DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera
~~~
Note you can also use chmod 755 instead of a+r