Skip to content

Instantly share code, notes, and snippets.

@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:

@robertkirkman
robertkirkman / README.md
Last active June 27, 2024 18:12 — forked from thalamus/ArchLinuxARM-M1
How to install Arch Linux ARM in QEMU full system emulator

How to install an Arch Linux ARM emulator

Prerequisites:

  • A PC with a Linux distribution - Arch Linux amd64 used here

Dependencies (for Arch Linux amd64):

  • edk2-armvirt
  • qemu-arch-extra
  • wget
@JakeCoxon
JakeCoxon / aoc2021.py
Last active March 8, 2023 23:05
Advent of Code 2021
# Python 2 only because they removed lambda argument unpacking in 3.0
import math, sys
from functools import reduce
from itertools import izip_longest
# AOC Day 1 part 1
print(len((lambda nums: [1 for x, y in zip(nums[:], nums[1:]) if y > x])
([int(x) for x in open("input1.txt").read().split()])))
# AOC Day 1 part 2
@timnugent
timnugent / 99-xone.rules
Last active June 2, 2023 14:28
udev rule for the Xone 23C; sets configuration to state "2" so this shows up as a 4 input/4 output soundcard - otherwise shows up as only 2 input/2 output. Only tested with the Xone 32C configured for DVS. Put this file in /etc/udev/rules.d/
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="22f0", ATTR{idProduct}=="0008", ATTR{bConfigurationValue}="2"

I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

@chrisswanda
chrisswanda / WireGuard_Setup.txt
Last active July 4, 2024 05:39
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@BigglesZX
BigglesZX / gifextract.py
Created November 5, 2012 10:31
Extract frames from an animated GIF, correctly handling palettes and frame update modes
import os
from PIL import Image
'''
I searched high and low for solutions to the "extract animated GIF frames in Python"
problem, and after much trial and error came up with the following solution based
on several partial examples around the web (mostly Stack Overflow).
There are two pitfalls that aren't often mentioned when dealing with animated GIFs -