Skip to content

Instantly share code, notes, and snippets.

View amcgregor's full-sized avatar
🏢
I died! …well, I got better…

Alice Zoë Bevan–McGregor amcgregor

🏢
I died! …well, I got better…
View GitHub Profile
@0xdevalias
0xdevalias / reverse-engineering-macos.md
Last active May 30, 2025 03:15
Some notes, tools, and techniques for reverse engineering macOS binaries
Faces...Faces...
Discovering the secret of human life may be the true path we should follow.
Faces, yes, human faces, appear different to you every time you look at them.
Our expressions are a separate matter, but I'm talking about a bigger picture.
We all have faces that are completely different from each other. So, where does
this diversity come from? Have you ever thought about it? Whether on the metro,
bus, ferry, or while watching a live music band, in short, at any corner of life,
I observe human faces. I see different expressions, different life experiences,
sorrows, joys, words of love, vows of commitment, the excitement of felt love—yes,
@kconner
kconner / macOS Internals.md
Last active May 30, 2025 01:09
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:

@amcgregor
amcgregor / _Multiple File Upload Capture.md
Last active August 19, 2023 13:22
A sample application to try out capturing multi-file uploads with nested structures.

Create a new virtual environment somewhere you'd like to place these files.

python3.9 -m venv uploadtest
cd uploadtest
. bin/activate

Then drop these files in that directory. Install dependencies:

@Enichan
Enichan / interpretoy.html
Last active December 16, 2021 21:38
Interpretoy: a toy lisp interpreter with REPL built in javascript
<html>
<head>
<title>Interpretoy REPL</title>
</head>
<body>
<script>
// based on lispy by Peter Norvig: http://norvig.com/lispy.html
function load(source) {
@amcgregor
amcgregor / change-delay.js
Last active February 8, 2024 17:44
Currently untested ES6 notepad sketches of isolatable global behaviors.
{ // "Change delay" committal of altered form fields and editable content without waiting for blur.
function monitorTyping(
element,
initial = 1000, // Initial delay value of one second.
highlight = true, // When entering a field, select its contents.
minimum = 500, // Minimum wait time.
threshold = 2, // Don't bother if the field has fewer than this many characters.
forceable = true // Ignore threshold on blur and when pressing enter.
) {
var timeout,

Originally posted at https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2011/august/javascript-cryptography-considered-harmful/

Javascript Cryptography Considered Harmful

WHAT DO YOU MEAN, "JAVASCRIPT CRYPTOGRAPHY"?

We mean attempts to implement security features in browsers using cryptographic algoritms implemented in whole or in part in Javascript.

You may now be asking yourself, "What about Node.js? What about non-browser Javascript?". Non-browser Javascript cryptography is perilous, but not doomed. For the rest of this document, we're referring to browser Javascript when we discuss Javascript cryptography.

@dexit
dexit / awesome-mac.md
Created September 28, 2021 13:26
[Awesome-mac] #macos #mac

Awesome Mac

jaywcjlove/sb jaywcjlove/sb jaywcjlove/sb Gitter

 This repo is a collection of AWESOME Mac applications and tools for developers and designers. Feel free to Star and Fork. Any comments, suggestions? Let us know. we love PRs :), please follow the awesome format.

Special thanks for the recommendation of @GitHubDaily.

Explanation

@amcgregor
amcgregor / ddelange-pip-constraints.md
Created July 28, 2021 04:50
Particularly interesting comment by ddelange on resolving Python packaging version complexity issues using pip's constraints functionality.

From: pypa/pip#9187 (comment)

could there be an easy option that forbides pip-21.2.1 to downgrade any already installed package (like specifying the existing packages version as a minimal constraint >= ) ?

@stonebig if you still have your pip cache populated, there is a way to achieve it without spamming the pypi registry: you can use the output of pip freeze and feed it to your pip command with an additional -r (it can be used multiple times):

pip freeze | sed 's/==/>=/' >> ./constraints.txt
pip install <some-new-package> -r ./constraints.txt