Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| #!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
| # syntax = docker/dockerfile:1.4.0 | |
| FROM node:20 | |
| WORKDIR /root | |
| RUN npm install sqlite3 | 
| /*?sr/bin/env go run "$0" "$@"; exit $? #*/ | |
| // This is actually not a shebang, the first line is both valid shell script and valid go code | |
| // Just run: chmod +x pass.go; ./pass.go | |
| package main | |
| import ( | |
| "bufio" | |
| "crypto/sha256" | |
| "encoding/base64" | |
| "fmt" | 
| $ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}' | |
| #ACAD1A | |
| #B0BB1E | |
| #DEBB1E | |
| #AB1DED | |
| #ACAC1A | |
| #ACCEDE | |
| #AC1D1C | |
| #BAB1ED | |
| #BA0BAB | 
| #!/bin/bash | |
| gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' | 
| theme | class | highlighter | fonts | ||||||
|---|---|---|---|---|---|---|---|---|---|
| default | text-center | MaskRay | 
 | 
| # IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX | |
| # | |
| # WIP research. (This was edited to add more info after someone posted it to | |
| # Hacker News. Click "Revisions" to see full changes.) | |
| # | |
| # Copyright (c) 2020 dougallj | |
| # Based on Python port of VMX intrinsics plugin: | |
| # Copyright (c) 2019 w4kfu - Synacktiv | 
| #!/usr/bin/env python3 | |
| import io | |
| import struct | |
| import sys | |
| import pprint | |
| import macholib.MachO | |
| from macholib.mach_o import LC_CODE_SIGNATURE | |
| import asn1crypto.x509 | |
| from asn1crypto.cms import ContentInfo, SignedData, CMSAttributes | 
| #!/bin/bash | |
| ### | |
| ### my-script — does one thing well | |
| ### | |
| ### Usage: | |
| ### my-script <input> <output> | |
| ### | |
| ### Options: | |
| ### <input> Input file to read. | |
| ### <output> Output file to write. Use '-' for stdout. | 
| #!/bin/bash | |
| # There's a better way to do this! Use: | |
| # https://github.com/dfm/rename-github-default-branch | |
| # instead. | |
| # | |
| # Also: don't change the default branch name on your gists! Github appears to have them | |
| # locked to master; it will break your gist. | |
| set -e |