ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install nmap
brew install vercel-cli
A better window switcher
See your next meeting right in your menu bar
Move and resize windows in macOS using keyboard shortcuts or snap areas
Remote Desktop manager
Drivers for Philips brilliance 499p
A little bit of 📝 that lives on your menu bar
Misc settings
- Launching from terminal:
- Open Command Palette (SHIFT+CMD+P) -> Shell Command: Install 'code' command in the PATH
- Open folder from Finder
brew install node
npm install -g homey
brew install azure-cli
brew tap azure/functions
brew install azure-functions-core-tools@2
brew install azure-functions-core-tools@3
Switching between azure-function-core-tools: brew link --overwrite azure-functions-core-tools@3
npm install -g vercel release create-react-app standard eslint
vercel login
- Create local folder for git repos
mkdir ~/source
Settings (Finder -> Preferences)
- General
- New Finder windows shows: '~/source'
- Open folders in tabs instead of new windows
- Side panel
- Videos (remove)
- Music (remove)
- Pictures (add)
- runely (Home)
- iCloud Drive (remove)
- Placements (add all)
- New etiquettes (remove)
- Advanced
- Activate all
- When searching: Search the open folder
Settings (View -> Show view options)
https://discussions.apple.com/thread/7941640
-
Sort by: Name
-
Icon size: 56 x 56
-
Click: Use as defaults
Chances are you've opened some Finder windows in the past. Individual folder options will override this default setting that we just set.
In order reset your folder settings across the entire machine we have to delete all .DS_Store files. This will ensure that all folders start fresh. Open up the Terminal application (Applications/Utilities/Terminal), and type:
sudo find / -name .DS_Store -delete; killall Finder
git config --global user.name "Rune Moskvil Lyngås"
git config --global user.email "rune.moskvil.lyngaas@vtfk.no"
git config --global github.user runely
git config --global color.ui true
ssh-keygen -t rsa -b 4096 -C "rune.moskvil.lyngaas@vtfk.no"
eval "$(ssh-agent -s)"
Edit ~/.ssh/config
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
ssh-add -K ~/.ssh/id_rsa
Copy key:
pbcopy < ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa
- Open https://github.com/settings/keys
- Add new SSH key
- Paste in the key from clipboard
brew install gpg
- Generate gpg keys and upload to github, as described in this guide
gpg --full-generate-key
-> RSA and RSA -> 4096 -> 0gpg --list-secret-keys --keyid-format LONG
- Copy the key in the
sec
section betweenrsa4096/
and the date gpg --armor --export key-copied-from-above
- Copy everything printed out
- Add to SSH and GPG keys
git config --global commit.gpgsign true
- Add gpg passphrase to keyring on first commit
npm set init.author.email "rune.moskvil.lyngaas@vtfk.no"
npm set init.author.url "https://github.com/runely"
npm set init.author.name "Rune Moskvil Lyngås"
npm set init.license "MIT"
npm set save-prefix ""
- nano
/Users/runely/.npmrc
- Change
init.author.email
into--init-author-email
- Change
init.author.url
into--init-author-name
- Change
init.author.name
into--init-author-url
- Change
init.license
into--init-license
- Change
chsh -s /bin/zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
curl -o ~/.oh-my-zsh/custom/themes/My-Theme.zsh-theme https://gist.githubusercontent.com/runely/c8bbf60ac7b9aa6da34b9df4f61017f6/raw/c7ebaba737b92b47802c50937f57af3ab2ae0020/My-Theme.zsh-theme
nano ~/.zshrc
# set/update the following
ZSH_THEME="My-Theme"
ZSH_DISABLE_COMPFIX=true
HIST_STAMPS="dd/mm/yyyy"
plugins=(git)
# You may need to manually set your language environment
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Preferred editor for local and remote sessions
#if [[ -n $SSH_CONNECTION ]]; then
# export TERM=xterm
#else
# export TERM=xterm-kitty
#fi
# My aliases
alias cd..="cd .."
alias ls="ls -la"
alias now="vercel"
# Set startup folder
if [ -z "$TERM_PROGRAM" ]; then
echo "Normal terminal launched. Setting start point"
cd ~/source
elif [ "$TERM_PROGRAM" = "Apple_Terminal" ]; then
echo "Apple terminal launched. Setting start point"
cd ~/source
else
echo "'$TERM_PROGRAM' launched. Skipping start point"
fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# show uptime
uptime
brew install zsh-syntax-highlighting
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
echo "# My aliases" >> ~/.bash_profile
echo "alias cd..=\"cd ..\"" >> ~/.bash_profile
echo "alias ls=\"ls -la\"" >> ~/.bash_profile
echo "alias now=\"vercel\"" >> ~/.bash_profile
echo "\n# Set startup folder" >> ~/.bash_profile
echo "if [ -z \"\$TERM_PROGRAM\" ]; then" >> ~/.bash_profile
echo " echo \"Normal terminal launched. Setting start point\"" >> ~/.bash_profile
echo " cd ~/source" >> ~/.bash_profile
echo "elif [ \"\$TERM_PROGRAM\" = \"Apple_Terminal\" ]; then" >> ~/.bash_profile
echo " echo \"Apple terminal launched. Setting start point\"" >> ~/.bash_profile
echo " cd ~/source" >> ~/.bash_profile
echo "else" >> ~/.bash_profile
echo " echo \"'\$TERM_PROGRAM' launched. Skipping start point\"" >> ~/.bash_profile
echo "fi" >> ~/.bash_profile
Settings
- Trackpad
- Trykk for å klikke
- Markørhastighet: 9/10
# Show hidden files in Finder
defaults write com.apple.finder AppleShowAllFiles true
# Show the ~/Library folder
chflags nohidden ~/Library
# Store screenshots in subfolder in Documents
mkdir ~/Pictures/Screenshots
defaults write com.apple.screencapture location ~/Pictures/Screenshots
# Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
# Show full folder path in finder
defaults write com.apple.finder ShowPathbar -bool true
# Show filename extensions by default
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Turn off smart quotes and dashes in Notes
defaults write com.apple.Notes SmartQuotes -bool false
defaults write com.apple.Notes SmartDashes -bool false
# allow apps from anywhere to run (restores "anywhere" option in system prefs)
sudo spctl --master-disable
# set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 2
# set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# disable the press and hold feature..
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Enable touchbar sudo
sudo nano /etc/pam.d/sudo
# Add the following line:
auth sufficient pam_tid.so
# Add a single space icon to your Dock. Repeat for more spaces (https://www.imore.com/add-space-your-mac-dock)
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock