macintosh

I use a Mac for work. I will always prefer my ThinkPad.
| ACLI | Jira |
| asdf | runtime version manager |
| VS Code* | IDE |
| Colima | container runtime |
| Dozer | hides stuff in the menu bar |
| fzf | fuzzy finder |
| gh | GitHub CLI |
| gum | for glamorous shell scripts |
| Homebrew | package manager |
| iTerm | terminal |
| jq | JSON processor |
| Obsidian | personal knowledge management |
| Postico | PostgreSQL client |
| Postgres.app | |
| ShellCheck | shell script analysis |
| starship | shell prompt |
| Catppuccin | theme and icons |
| Credo | Elixir linter |
| ElixirLS | Elixir language support and debugger |
| GitLens | git supercharger |
| NPM | manage dependencies |
| shell-format | shell script formatter |
| Vitest | testing framework |
shortcuts
I can’t technically share the Shortcuts I have set up due to ridiculous work policies regarding intellectual property and yada-yada, but I can tell you some of the ones I use.
- morn
- runs every morning and sets me up for the work day (turns the Wi-Fi on, opens Slack and IDE, etc.)
- sol
- checks the UV index in the area and lets me know if it's safe to go outside
- join
- opens the Meet link of the next calendar event
- qrl
- generates a QR code from the clipboard
- eve
- runs when I go for lunch or clock out of work (sets DND, turns the Wi-Fi off for good measure†, then sleeps)
You can set up cron jobs to run Shorcuts:
# work-life balance
0 9,13 * * * shortcuts run morn
0 12,17 * * * shortcuts run eveapplescript
AppleScript is a scripting language.
Send a system notification with sound (sound files in /System/Library/Sounds or ~/Library/Sounds)
osascript -e 'display notification "take a break" sound name "Glass"'Show a popup dialog. I currently use this to remind me to take breaks every 20 minutes throughout the work day
*/20 9-17 * * 1-5 osascript -e 'display dialog "take a break"'When I’m testing things locally, i.e. web apps in incognito, the first thing I usually do is open DevTools. Not sure why but launching Chrome‡ with --auto-open-devtools-for-tabs doesn’t actually open DevTools, so here’s an AppleScript workaround:
URL="http://localhost:8715" # or whatever
osascript <<EOF
tell application "Google Chrome"
do shell script "open -na 'Google Chrome' --args --incognito '$URL'"
delay 1
tell application "System Events"
keystroke "i" using {command down, option down}
end tell
end tell
EOFMute/unmute the microphone. Company™ IT may have sleazy ways around this, so every now and then, I directly grace the microphone with a proximate and prolonged whistle, just in case.
osascript -e "set volume input volume 0"
osascript -e "set volume input volume 50"grimoire

Copy and paste stuff via Terminal
echo 'meow' | pbcopy
pbpasteGPG issues? Usually occurs after package update
gpgconf --kill gpg-agentMake Mac sleep
pmset sleepnowPrevent Mac from sleeping
caffeinate
caffeinate -u -t 3600 # stay awake for an hourget battery cycle count
system profiler SPPowerDataType | grep "Cycle Count" | awk '{print $3}'xcode woes
xcode-select --install
xcode-select --resetRemind yourself to leave. This will constantly prompt your terminal with a Time to leave!
message every minute. To disable it, you have to log off (or use kill).
leave 1700 # leave at 17:00
leave +0130 # leave in 1 hour and 30 minutes