Skip to content

Instantly share code, notes, and snippets.

View francisfeng's full-sized avatar
🤒
Working hard!

Francis Feng francisfeng

🤒
Working hard!
View GitHub Profile
@coolaj86
coolaj86 / MacOS-Icons.md
Last active May 1, 2024 22:18
MacOS Default Icons Locations

How to Find ANY Icon

  1. Open the application such that you see the icon on your screen.
  2. Open Activity Monitor
  3. Double click the name of the application (i.e. Finder or System Preferences)
  4. Select "Open Files and Ports"
  5. Copy the output to a file and then grep for .icns

Similarly you could run this command, but it may take several minutes to complete:

#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@rpomeroy
rpomeroy / gist:c0bf58a2c62f34fdad8d
Created July 20, 2014 20:04
NSColor from hex or hexString
// Paste in playground
// Handy NSColor and String extensions
import Cocoa
extension String {
func conformsTo(pattern: String) -> Bool {
let pattern = NSPredicate(format:"SELF MATCHES %@", pattern)