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
@dannysmith
dannysmith / osx_setup.sh
Last active June 24, 2024 20:35
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 &
@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.
#
@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active October 6, 2024 20:11
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.
@fzwo
fzwo / LegacyDocsets.md
Last active November 12, 2024 05:19
Download and view old Apple developer documentation

How to download and view legacy documentation from Apple (no need to sign in to your dev account)

  1. Download the docset index XML.
  2. Find the docset you want (there are some with URL https://apple.com/none.dmg; ignore them - you will find them again further down the file with a working URL).
  3. Download the dmg. It's probably around a gigabyte or so.
  4. "Install" the .pkg file somewhere on your disk. If you don't trust the installer, do it manually:
    1. Find the largest file, named Payload, and extract it using The Unarchiver.
    2. This creates a new, even larger file, probably named Payload-1.
    3. Extract Payload-1 using The Unarchiver.
  5. After many minutes of extracting, we have our .docset file.
@RALMAZ
RALMAZ / .htaccess
Created July 27, 2017 10:25
Все фишки для htaccess
Options All -ExecCGI -Indexes -Includes +FollowSymLinks
#Options -MultiViews
# REWRITE ___________________
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^roocms
@gdurastanti
gdurastanti / parallels-reset.sh
Created August 9, 2017 14:00
Reset Parallels' trial
#!/bin/sh
# Reset Parallels Desktop's trial and generate a casual email address to register a new user
rm /private/var/root/Library/Preferences/com.parallels.desktop.plist /Library/Preferences/Parallels/licenses.xml
jot -w pdu%[email protected] -r 1
@amandaw33
amandaw33 / com.adobe.Acrobat.Pro.plist
Last active December 4, 2024 17:19
Acrobat Pro DC plist to disable updating, cloud services etc - more info on keys: http://www.adobe.com/devnet-docs/acrobatetk/tools/PrefRef/Macintosh/Workflows.html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DC</key>
<dict>
<key>FeatureLockdown</key>
<dict>
<key>bUpdater</key>
<false/>