Skip to content

Instantly share code, notes, and snippets.

@say-kaj
Last active March 2, 2023 12:01
Show Gist options
  • Save say-kaj/088201761763050743e39900b44ef7f4 to your computer and use it in GitHub Desktop.
Save say-kaj/088201761763050743e39900b44ef7f4 to your computer and use it in GitHub Desktop.
[Stuff to install on the mac] setup my MacBook from scratch #mac #setup

homebrew & Stuff

homebrew

Get a terminal up and

  • xcode-select --install
  • /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • brew help check installation - kinda
  • brew analytics off to turn of sending out anylytics

--> uninstall
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

keep brew stuff up to date by using an all in alias:
alias brewup='brew update; brew upgrade; brew cleanup; brew doctor'

brew update and brew upgrade will refresh all brew'ed stuff
brew cleanup will remove any older versions of packages
brew doctor will check the system for potential problems and show them

cask installations require a brew cask upgrade on-top

list of non cask packages can be found here cmdline search with brew search xyz will return brew and cask Packages

cask

Cask allows to easy install Mac OS GUI apps and binaries directly from the command line using Homebrew.

brew install cask

example to install Chrome would be brew install google-chrome or brew install iterm2

Toolchain

unsorted list of common tools

brew install htop wget nmap watch tree neofetch netdata mkdocs

  • wget just fetch stuff from www
  • nmap free portscanner
  • watch make any cmd tool a monitored process -> watch -n 5 "df -k" to monitor diskspace every 5sec
  • tree recursive directory listing command
  • neofetch commandline SysInfo tool
  • netdata Server monitoring that gives some great insite also into a normal machine. Integrates well with Übersicht
  • mkdocs fast and simple static site generator

brew cask install iterm2 DaisyDisk cakebrew iina alfred bartender cheatsheet valentina-studio sublime-text proxyman keka latest teamviewer odio balenaetcher switchresx exifrenamer 1password brave-browser cyberduck slack powershell monitorcontrol archi lipton youtube-dl ffmpeg

  • iterm2 terminal replacement
  • DaisyDisk what's on my disk,... and why is it full again???
  • cakebrew GUI for homebrew
  • iina replacement for vlc, better macos integration and look&feel
  • alfred spotlight search on steroids
  • bartender can't see what important on my menubar
  • cheatsheet tells me all keystroke a given app has
  • valentina-studio Free DB Manager
  • sublime-text textediting...
  • proxyman HTTP Debugging Proxy
  • keka MacOS File Archiver
  • latest checks if all apps are up to date
  • teamviewer I am still my parents admin :O
  • odio Radiostations all over the world
  • baleanaetcher Burn My USB,... need it for my PI stuff
  • franz multichat tool - runs here for whatsapp, skype and messenger
  • switchresx Sometime I need to heavily tweak Monitorsettings
  • exifrenamer batch rename for images
  • 1password Beware - this is getting the latest and greates - we are still on v6 bcause of dropbox sync
  • archi Archimate GUI - installer currently broken on archimetetool.com
  • bravebrowser alternate Browser with easy TOR interface
  • cyberduck cloud storage browser with support for FTP, SFTP, WebDAV, Amazon S3, OpenStack Swift, Backblaze B2, Microsoft Azure & OneDrive, Google Drive and Dropbox.
  • slack
  • powershell
  • lipton Lean GitHub Gist Client
  • monitorcontrol enables sound and light control for a monitor (particularly sound does not work without)
  • youtube-dl allows donloads from Youtube --> youtube-dl -f bestvideo+bestaudio 'link'
  • ffmpeg required for youtube-dl

How to Use Gist in Sublime

Quick Look

Bunch of Mac quicklook plugins (finder, mark file press space to preview/quicklook) brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json qlprettypatch quicklook-csv webpquicklook suspicious-package aerial

  • aerial Apple TV aerial screensaver

Manual install

Greenshot | iStat Menus | Magnet | LanScan Pro | iA Writer | Dash | Deliveries | Fritz | Adobe | AffinityPhoto | CEWE Fotowelt | SQL Operations Studio | Sunflower Bed | Pixer | PowerMenu | VisualStudioCode | Office 365 Muehlena.de | Skype for Busines | Microsoft ToDo | Paprika Recipe Manager | MacFamilyTree

The cewl shit

Pimp the finder

$ defaults write com.apple.finder ShowPathbar -bool true enables a Path Bar in the finder (bottom part of the finder Window)

$ defaults write com.apple.finder ShowStatusBar -bool true enables the Status Bar below the above enabled Path Bar

Kubernetes

brew cask install virtualbox
brew install kubectl
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.27.0/minikube-darwin-amd64 &&\ chmod +x minikube &&\ sudo mv minikube /usr/local/bin/ --> see here for latest version

This will setup Kubernetes in specific single node version. Now Start with minikube start - will also fetch the newest minikube.iso and may take a while to start. Now all should be set. kubectl api-versions should throw out a couple of versions for the tooling - if so - all runs.
We have a working Kubernetes Cluster now - yai :)

brew cask install kubernetic to get a graphical UI for managing Kubernetes. Should automagically connect to the minikube

Docker

brew cask install docker

This gets the latest stable Docker for Mac - after install start and configure

check if it's workoing via docker run -d -p 80:80 --name webserver nginx This pulls the latest nginx and runs it... check http://localhost or 'docker container ls'

brew cask install kitematic to get a GUI interface to docker

MacOS config Stuff

sudo with fingerprint

Beware that this make SSH into your machine a bit cumbersome as the Fingerprint usually does not travel along the line !

  • change to /etc/pam.d/ and make sudo read&write
  • insert into second line (after the comment line) auth sufficient pam_tid.so
  • save and close
  • Change back to read only

ssh Stuff

edit ~/.ssh/config by adding the pi hosts

	HostName TheIPadressHere
	user TheUsualUserID
	RemoteForward 52698 127.0.0.1:52698

then do $ ssh-copy-id conveniantHostName and login with the password once

Editing Files Remotely via SSH on SublimeText 3

Sometimes you need to edit a file on a remote server, but using vim/emacs is not very practical, due to lag and speed of screen refresh.

TextMate users have the classic rmate, but it was implemented in Ruby, which may not be available on the remote server.

A better option is to use this version of rmate, implemented in pure Bash. It's a single file, self-contained, and with no external dependencies.

Step by step:

  1. On your local workstation: On Sublime Text 3, open Package Manager (Ctrl-Shift-P on Linux/Win, Cmd-Shift-P on Mac, Install Package), and search for RemoteSubl

  2. On your local workstation: Add RemoteForward 52698 127.0.0.1:52698 to your .ssh/config file, or -R 52698:localhost:52698 if you prefer command line

  3. On your remote server:

    sudo wget -O /usr/local/bin/rsub https://raw.github.com/aurora/rmate/master/rmate
    sudo chmod a+x /usr/local/bin/rsub

Just keep your ST3 editor open, and you can easily edit remote files with $ rsub myfile.txt

EDIT: if you get "no such file or directory", it's because your /usr/local/bin is not in your PATH. Just add the directory to your path:

echo "export PATH=\"$PATH:/usr/local/bin\"" >> $HOME/.bashrc

Now just log off, log back in, and you'll be all set.

Credits: Gui Ambros via https://wrgms.com/editing-files-remotely-via-ssh-on-sublimetext-3/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment