macOS keyboard shortcut favorites
Command (or Cmd) - ⌘
Control (or Ctrl) - ^
Option (or Alt) - ⌥
Shift - ⇧
Fn (Function) - 🌐
const symbols = [ | |
// special forms | |
'lambda', 'when', 'rec', 'define', | |
// standard library | |
'inc', 'dec', 'add', 'mul', 'eq', 'head', 'tail', 'cons', 'list', 'isNil', | |
// variables | |
'a', 'b', 'c', 'k', 'l', 'm', 'n', 'x', 'y', 'z', | |
'as', 'xs', | |
'fn', 'double', 'map', | |
] |
#cd into directory in Finder's front window | |
function cdf() { | |
finderPath=`osascript -e 'try | |
tell application "Finder" to set the source_folder to (folder of the front window) as alias | |
on error | |
tell application "Finder" to set source_folder to insertion location as alias | |
end try | |
return POSIX path of source_folder as string'` | |
cd "$finderPath" |
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
// sh.mjs: javascript shorthand | |
// array helpers (apl/j/k) | |
export const id=x=>x | |
export const af=(n,x)=>Array(n).fill(x) // TODO: make this 'afl' or 'fil' (aa?) | |
export const ii=(n,f)=>{for(let i=0;i<n;i++)f(i)} | |
export const im=(n,f)=>af(n,0).map((_,i)=>f(i)) | |
export const ia=(n,f)=>im(n,id) | |
export const at=(a,ixs)=>ixs.map(i=>a[i]) | |
export const io=(xs,ys)=>ys.map([].indexOf.bind(xs)) |
During Setup Assistant,
Choose French as language and France as region.
Add English (US) as 2nd preferred language (to be able to search for emoji in French+English, etc.), remove any keyboard besides ABC.
In Vision settings, enable ⌃-2-fingers zoom and automatic switch between Light & Dark mode.
Don’t import any backup, connect to iCloud, create an account without touching the avatar (guarantees it’ll use iCloud’s), customize data sharing, enable FileVault, add a fingerprint for Touch ID, set up Apple Pay.
Download apps on the Mac App Store:
Pages, Numbers, Keynote, Pixelmator Pro, Final Cut Pro, Apple Configurator, 1Blocker for Safari, Shareful, Messenger, Ivory, Mactracker, Apple Developer, TestFlight, Key Codes, Boop.
find /System/Library/LaunchDaemons /System/Library/LaunchAgents -name "*.plist" \ | |
| while read p ; do plutil -convert json -o - ${p} \ | |
| jq -r ' .. | objects | with_entries(select(.key == "Notification")) | select(. != {}).Notification' | |
done | sort -u > ~/Desktop/all-launchd-notifications.txt |
-- Make sure commandline client (/usr/local/bin/hs) is installed | |
-- and IPC module is running. | |
require("hs.ipc") | |
local logger = hs.logger.new("ipc", "info") | |
local path = "/usr/local" | |
-- On Macs with Apple chips, install cli in /opt/homebrew/ with Homebrew | |
-- as /usr/local doesn't seem to be writable. |