Apple(アップル)
DNSキャッシュクリア
sudo killall -HUP mDNSResponderDS_Store 一括削除
find . -name '.DS_Store' -type f -ls -deleteDS_Store を作成しない
defaults write com.apple.desktopservices DSDontWriteNetworkStores True隠しファイルを表示
3つのキーを同時押し
[command] + [shift] + [.(ドット)]
コマンドで設定する場合
表示する
defaults write com.apple.finder AppleShowAllFiles TRUE非表示
defaults write com.apple.finder AppleShowAllFiles FALSEFinder を再起動して反映
killall FinderFinder に終了を追加
defaults write com.apple.Finder QuitMenuItem -boolean true
# Finder 再起動
Killall Finder もとに戻す
defaults delete com.apple.Finder QuitMenuItemcdf でカレントディレクトリへ移動
Macで開いているウィンドウへ移動するコマンド
vim ~/.zshrc下部に追加する
cdf() {
target=`osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)'`
if [ "$target" != "" ]; then
cd "$target"; pwd
else
echo 'No Finder window found' >&2
fi
}
alias f='open .'設定を反映
source ~/.zshrcターミナルで 「cdf」 を入力すると開いているウィンドウのカレントディレクトリが開きます。
Chrome の SSLエラーを回避
https://qiita.com/DisneyAladdin/items/051eeef71cece244bd11
開発などでSSLエラーが出てサイトを開けない場合
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --ignore-certificate-errors --ignore-urlfetcher-cert-requests &> /dev/nullまたは以下で直接Chromeを起動する
open -a Google\ Chrome --args --ignore-certificate-errors --ignore-urlfetcher-cert-requests && exitApple(アップル)