Skip to content

Instantly share code, notes, and snippets.

@khsing
khsing / mactips.sh
Last active June 24, 2024 20:35
some hacks for mac
#!/bin/bash
# curl -skL https://gist.github.com/khsing/6697187/raw/mactips.sh | bash
# "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Allow Finder quit.
defaults write com.apple.finder QuitMenuItem -bool true
@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active June 9, 2025 22:16
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@dannysmith
dannysmith / osx_setup.sh
Last active June 20, 2025 14:08
Sensible defaults for New Mac
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@xpepper
xpepper / Some tools and tweaks on Mac OS X.md
Last active May 6, 2025 14:52 — forked from g3d/gist:2709563
Some tools and tweaks on Mac OS X
@mikermcneil
mikermcneil / disabling-macosx-notification-center.md
Last active June 24, 2025 16:49
Disable/Enable Notification Center (MacOS X)

Toggle MacOS X Notification Center on or off

This gist is to remind me (and anyone else who it helps) how to quickly disable and re-enable Notification Center.

Set Up Bash Aliases

Installation

  1. Open your terminal (<⌘ + ␣ (spacebar)>, then type "terminal", then press <↩ (enter)>).
@8ig8
8ig8 / mac.sh
Last active September 7, 2024 15:00
Mac/OSX config, etc.
# Most of these are from:
# https://github.com/paulirish/dotfiles/blob/master/.osx
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# To check a value use `read`:
#
# defaults read com.apple.LaunchServices LSQuarantine
#
# If value does not exist, then it has been manually set.
#
@pdostal
pdostal / .bashrc
Last active June 12, 2025 16:05
Mac OS X WIFI advanced settings
alias airport='sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport'
@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active February 5, 2025 03:03
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

Update (October 2021)

Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.

Original, Obsolete Content (2014)

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

@nmccready
nmccready / macos-optimize-setup.md
Last active September 15, 2024 10:38 — forked from kevinelliott/1-macOS-10.12-sierra-setup.md
macOS optimize setup

macOS 10.12 Sonoma and Up Setup

Most things should work in newer versions of macOs with slight tweaks.

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

@pvieito
pvieito / amfid_patch.py
Created December 27, 2016 00:14
This script can patch macOS 10.12.2 amfid daemon on memory to allow arbitrary entitlements in Developer ID signed binaries.
#!/usr/bin/env python3
'''amfid_patch.py - Pedro José Pereira Vieito © 2016
This script can patch macOS 10.12.2 amfid daemon on memory
to allow arbitrary entitlements in Developer ID signed binaries.
Killing amfid will make the patch disapear:
$ sudo kill -9 `pgrep amfid`
You must run the script as a root (sudo) and with SIP disabled.