matisiekpl / development-setup

Development setup for macOS πŸ’»

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Development setup πŸ’»

Setup March 2022
Hardware Apple MacBook Pro M1 2020
CPU Apple M1
Memory 16GB
Disk 512GB
OS Apple macOS 12.2.1 (Monterey)
Screen resolution 3360x2100 px

Software

Karabiner Elements

Used for mapping keys, especially for polish accent characters (swapes right_option and right_command). Checkout file karabiner.json

https://karabiner-elements.pqrs.org/ image

Terminal

Terminal Emulator: iTerm2 Shell: ohmyzsh, robbyrussell theme

https://iterm2.com/ image

Useful aliases:

alias yt2mp3="youtube-dl --extract-audio --audio-format mp3"
alias yt2mp4="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4'"

alias curltime="curl -w \"@$HOME/.curl-format.txt\" -o /dev/null -s "
alias curltime="curl -w \"@$HOME/.curl-format.txt\" -o /dev/null -s "
alias msq="mysql -u root -p -h 127.0.0.1"

Covid19 statistics:

curl covid19.mateuszwozniak.com

Tool env2kube.sh - tool for converting .env files to Kubernetes deployment env definitions

#!/usr/bin/env python3
import sys

filename = sys.argv[1]

with open(filename) as file:
    lines = file.readlines()
    lines = [line.rstrip() for line in lines]
    for line in lines:
        if len(line) > 0:
            parts = line.split('=')
            if len(parts) > 1:
                if not parts[1].startswith('='):
                    parts[1] = '"' + parts[1] + '"'
                    print('- name: ' + parts[0])
                    print('  value: ' + parts[1])

Sample output:

$ env2kube .env
- name: APP_NAME
  value: "Laravel"
- name: APP_ENV
  value: "local"
- name: APP_KEY
  value: "base64:abcdefgh+iklkabdjsbdj"
- name: APP_DEBUG
  value: "true"
- name: APP_URL
  value: "http://localhost"

FFMPEG

Awesome tool for working on video codecs

brew install ffmpeg

image

Some tips:
# Extract audio from mp4
ffmpeg -i input.mp4 -vn -acodec copy output-audio.aac

# Mute audio
ffmpeg -i input.mp4 -c copy -an output.mp4

# Reencode video with given CRF
ffmpeg -i input.mp4 -c:v libx264 -crf 18 -c:a copy output.mp4

# Trim video
ffmpeg -ss 00:01:00 -to 00:02:00 -i input.mp4 -c copy output.mp4

Homebrew

Package manager

https://brew.sh/index_pl

NVM - Node Version Manager

Easily switch Node.js versions

https://github.com/nvm-sh/nvm

nvm install 16
nvm use 16

Alfred

Blazing fast spotlight alternative with many index features (checkout main.alfredpreferences.zip for importing config)

image

Fallback searches can:

  • search on YouTube
  • search on Allegro
  • calculate derivative
  • calculate integral
  • evaluate expression in Wolfram
  • check person details in AGH SkOS
  • search for song lyrics in Genius

Activation is using:

image

Chrome - website browser

Useful shortcuts:

command + t - new tab

command + w - close tab

command + q - exit chrome

commnnd + 1,2,3,4...i - switch to tab i

https://www.google.com/intl/pl_pl/chrome/

HandBrake

Encoder for h264, h265. Useful for trimming videos or reencoding the codec. Can also rip DVDs

https://handbrake.fr/ image

Tiles

Snaps windows to corners.

Useful shortcuts

option + command + left/right - moves window to half of screen

option + command + f - fullscreen window

https://freemacsoft.net/tiles/ image

Motrix

Download manager, speeds up HTTP(s) downloads using concurrency

https://motrix.app/ image

VLC

Video player supporting many codecs

https://www.videolan.org/vlc/download-macosx.pl.html image

GeoGebra Calculator Suite

Math toolkit for visualising things, especially useful in learning for exams

https://www.geogebra.org/download?lang=pl image

About

Development setup for macOS πŸ’»