Skip to content

Instantly share code, notes, and snippets.

View 0bmxa's full-sized avatar

Max 0bmxa

  • Berlin
View GitHub Profile
@0bmxa
0bmxa / opendiff_xcodeproj.sh
Last active August 29, 2022 10:03
git diff: YAML based Xcode project diff
#!/bin/sh
#############################################################
# Requires the xcodeproj tool: #
# https://github.com/CocoaPods/Xcodeproj #
# #
# Note: #
# As this only shows a representation of the project and #
# not the project file directly, this is only suitable #
# for diffs, not for merges. #
@0bmxa
0bmxa / man
Created April 14, 2018 14:44
A wrapper around `man` to show in which sections the command is available
#!/bin/zsh
CMD_NAME=$1
ORIGINAL_MAN='/usr/bin/man'
# If first arg is a section number alread, open `man` right away
if [[ $CMD_NAME -gt 0 && $CMD_NAME -lt 10 ]]; then
$ORIGINAL_MAN $@
exit 0
fi
@0bmxa
0bmxa / how_many_chromes.sh
Last active February 26, 2021 22:36
How many Chromes do *You* have? (On your macOS)
#!/bin/sh
printf 'All these apps contain Chromium or its frameworks:\n'
find -E /Applications/*.app -type d -iregex ".*(electron|chrom).*(framework|app)$" | cut -d/ -f3 | sort | uniq
printf "\n\nOh dear, that's a lot of Chromes...\nYou really hate your RAM, don't you?\n\n"
@0bmxa
0bmxa / Enable macOS WiFi roaming.sh
Last active March 14, 2024 11:26
Enable/fix macOS WiFi roaming (802.11k, 802.11r, 802.11v)
# 1. Enable roaming
sudo defaults write /Library/Preferences/com.apple.airport.opproam enabled -bool true
# (Optional) Un-disable roaming
#sudo defaults write /Library/Preferences/com.apple.airport.opproam disabled -bool false
# 2. Prefer networks with stronger signals
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport en0 prefs JoinMode=Strongest