Skip to content

Instantly share code, notes, and snippets.

View foreignfilm's full-sized avatar

Arnold foreignfilm

View GitHub Profile
@foreignfilm
foreignfilm / hack.sh
Created March 31, 2012 13:14 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@foreignfilm
foreignfilm / String+ContainsEmoji.swift
Last active March 2, 2018 13:06 — forked from Ziewvater/gist:998b5806b0d12e4cf35b
Determining if a Swift string contains emoji characters (or other dingbats)
extension String {
var containsEmoji: Bool {
for scalar in unicodeScalars {
switch scalar.value {
case 0x1F600...0x1F64F, // Emoticons
0x1F300...0x1F5FF, // Misc Symbols and Pictographs
0x1F680...0x1F6FF, // Transport and Map
0x2600...0x26FF, // Misc symbols
0x2700...0x27BF, // Dingbats
@foreignfilm
foreignfilm / macOS_SytemPrefs.md
Created February 29, 2024 07:24 — forked from rmcdongit/macOS_SytemPrefs.md
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane