-
Notifications
You must be signed in to change notification settings - Fork 1
/
macosx.txt
91 lines (68 loc) · 2.88 KB
/
macosx.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Mac OS X for Linux users
brew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
zsh:
brew install zsh
echo /usr/local/bin/zsh >> /etc/shells # as root (sudo su -)
chsh -s /usr/local/bin/zsh
GNU replacements for some BSD commands:
https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
PATH setup for the below: https://github.com/kurkale6ka/zsh/blob/master/.zshrc#L60-L74
brew install coreutils # to get gls...
brew install ed
brew install findutils # to get glocate...
...
https://github.com/kurkale6ka/scripts/blob/master/mkconfig
nvim:
brew tap neovim/neovim
brew install --HEAD neovim
sudo easy_install pip
pip2 install --user neovim # even root is not allowed to write to some locations!
Updating formulas:
brew update && brew upgrade # as your normal user
brew reinstall --HEAD neovim
fzf:
Don't use brew
https://github.com/junegunn/fzf/wiki/On-MacVim-with-iTerm2
locate:
* updatedb from findutils is different than its Linux counterpart. It doesn't use /etc/updatedb.conf. Run it like so:
* updatedb --prunepaths='/afs /media /mnt /net /sfs /tmp /udev /var/cache /var/lock /var/run /var/spool /var/tmp /Recovered.Items /.DocumentRevisions-V100 /.MobileBackups /.Spotlight-V100 /.Trashes /.fseventsd /Groups /Shared /Shared.Items /private/tmp /private/var/cache /private/var/lock /private/var/run /private/var/spool /private/var/tmp /Applications /Library /System'
/.DocumentRevisions-V100 (equivalent of .git for Versions)
/.Spotlight-V100 (spotlight indexes)
* Replace spaces with dots because of some oddity related to updatedb using regexes
* cron jobs
http://alvinalexander.com/mac-os-x/mac-osx-startup-crontab-launchd-jobs
iTerm2:
-------
tmux ^←|→ not working:
disable keyboard shortcuts: mission control/move left|right a space
Extending selection in vim not working:
Preferences/Pointer: add Ctrl to the right button single click
Shortcuts:
fn ← - Home
fn → - End
fn <bs> - del
Esc . - Alt .
alt 3 - #
⇧ ⌘ g - open location bar in Finder (so you can go to /usr/local say)
Ctrl + Shift + ↑ - PageUp
Ctrl + Shift + ↓ - PageDown
⇧ ⌘ Enter - maximize window
Custom layout:
Window/Restore Window Arrangement
Finder:
-------
search - kind:image|movie|png...
space bar to preview images in a slideshow
cmd + click on URL opens empty new window:
problem: browser's been updated but not relaunched
Become root:
------------
1. su - admin # ask ops for password
sudo su - will only work if you have admin access thus you are in the sudoers file
2. sudo su -
su - won't work as the root pass isn't known/setup by default
Expand Google Chrome Horizontally and Vertically:
Alt+Shift and click the green button (alt alone expands vertically only)
Change terminal hostname:
sudo scutil --set HostName aldebaran.taurus