Skip to content

Instantly share code, notes, and snippets.

View jrk's full-sized avatar

Jonathan Ragan-Kelley jrk

View GitHub Profile
@dhh
dhh / linux-setup.sh
Last active June 28, 2024 16:59
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@kconner
kconner / macOS Internals.md
Last active June 27, 2024 18:48
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:

@meub
meub / download-aura-photos.py
Last active June 17, 2024 17:33
This is a simple script to bulk download all the photos from an Aura digital picture frame (auraframes.com). Aura provides no easy way to bulk download photos off of frames so I created this for use with Python 3.
# I created a repo for this project here: https://github.com/meub/aura-frame-downloader
#!/bin/bash
# This script backs up files using restic and sends emails on success or errors.
#
# Files that the script expects:
# /usr/local/etc/restic/repo.env: shell variables that define the restic repository
# /usr/local/etc/restic/include.txt: paths to back up
# /usr/local/etc/restic/exclude.txt: paths to not include in the backup, even if they are in include.txt
#
# Inspired by https://gist.github.com/perfecto25/18abbd6cfbaa4e9eb30251470e9b7504
@robmiller
robmiller / play-wordle.rb
Last active February 15, 2022 19:40
A command-line, offline version of Wordle. A new word every time you run it.
#!/usr/bin/env ruby
#
# Play a command-line version of Wordle
#
# Original game by Josh Wardle: https://www.powerlanguage.co.uk/wordle/
#
# Installation and usage:
#
# 1. Save this file somewhere as play-wordle.rb
# 2. Run `ruby play-wordle.rb`
#!/usr/bin/env ruby
#
# Trying to guess what the best first-choice word in Wordle might be.
#
# Author: Rob Miller <r@robm.me.uk>
# Boosts the score of a word that matches the first letter, with the
# rationale that getting the first letter makes the word easier for
# a human being to guess
FIRST_LETTER_WEIGHT = 2
@drewkerr
drewkerr / get-focus-mode.js
Last active May 29, 2024 16:16
Read the current Focus mode on macOS Monterey (12.0+) using JavaScript for Automation (JXA)
const app = Application.currentApplication()
app.includeStandardAdditions = true
function getJSON(path) {
const fullPath = path.replace(/^~/, app.pathTo('home folder'))
const contents = app.read(fullPath)
return JSON.parse(contents)
}
function run() {
@pdarragh
pdarragh / papers.md
Last active April 17, 2024 19:29
Approachable PL Papers for Undergrads

Approachable PL Papers for Undergrads

On September 28, 2021, I asked on Twitter:

PL Twitter:

you get to recommend one published PL paper for an undergrad to read with oversight by someone experienced. the paper should be interesting, approachable, and (mostly) self-contained.

what paper do you recommend?

@merlinmann
merlinmann / wisdom.md
Last active April 17, 2024 21:52
Merlin's Wisdom Project (Draft)

Merlin's Wisdom Project

Or: “Everybody likes being given a glass of water.”

By Merlin Mann.

It's only advice for you because it had to be advice for me.

# 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