Skip to content

Instantly share code, notes, and snippets.

@kconner
kconner / macOS Internals.md
Last active March 4, 2026 17:23
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@eevee
eevee / gist:4dcfe41ae4b1d906adee
Last active August 29, 2015 14:06
mutable hash keys in ruby
irb(main):001:0> h = {}
=> {}
irb(main):002:0> a = [1, 2, 3]
=> [1, 2, 3]
irb(main):003:0> h[a] = 5
=> 5
irb(main):004:0> h
=> {[1, 2, 3]=>5}
irb(main):005:0> h[[1, 2, 3]]
=> 5
@aleks-mariusz
aleks-mariusz / safari-open-pages.py
Created August 24, 2014 16:35
This script fetches the current open tabs in all Safari windows. Useful to run remotely on your mac when you are at work and want to read a page you have open (remotely) at home but don't remember the url but can log in to your home system on the command line
#!/usr/bin/python
#
# This script fetches the current open tabs in all Safari windows.
# Useful to run remotely on your mac when you are at work and want
# to read a page you have open (remotely) at home but don't remember
# the url but can log in to your home system on the cmmand line
#
import sys
@willurd
willurd / web-servers.md
Last active March 13, 2026 17:53
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000