Skip to content

Instantly share code, notes, and snippets.

@kconner
kconner / macOS Internals.md
Last active July 2, 2025 14:28
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:

@andrebrait
andrebrait / keychron_linux.md
Last active June 30, 2025 18:16
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@zserge
zserge / guest.S
Created May 10, 2020 08:41
A tiny KVM host to run a 16-bit real mode "kernel"
# A tiny 16-bit guest "kernel" that infinitely prints an incremented number to the debug port
#
# Build it:
#
# as -32 guest.S -o guest.o
# ld -m elf_i386 --oformat binary -N -e _start -Ttext 0x10000 -o guest guest.o
#
.globl _start
@zserge
zserge / kvm-host.c
Last active June 17, 2025 04:52
Tiny KVM host to at least partially run Linux kernel
#define _GNU_SOURCE
#include <asm/bootparam.h>
#include <errno.h>
#include <fcntl.h>
#include <linux/kvm.h>
#include <linux/kvm_para.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@cingobean
cingobean / PackageTracking.php
Created March 12, 2020 03:45
Package Tracking (J&T | SiCepat | TIKI | AnterAja | WAHANA | Ninja | Lion | Lazada | JNE)
<?php
/*
.---------------------------------------------------------------------------.
| Script: Package Tracking |
| Version: 2.0.4 |
| Release: December 23, 2019 (17:46 WIB) |
| Update: January 05, 2019 (11:41 WIB) |
| |
| Pasal 57 ayat (1) UU 28 Tahun 2014 |
| Copyright © 2019, Afdhalul Ichsan Yourdan. All Rights Reserved. |
@hlorand
hlorand / vidstab_ffmpeg.md
Last active June 5, 2025 18:00
Video stabilization using VidStab and FFMPEG

Video stabilization using VidStab and FFMPEG

** Step 1 **

Install ffmpeg with the vidstab plugin.

@seanhandley
seanhandley / docker-compose.yml
Last active January 23, 2025 09:49
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@andyrbell
andyrbell / scanner.sh
Last active June 13, 2025 21:03
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@grimzy
grimzy / git-pull-all
Created September 15, 2017 02:15
Git pull all remote branches
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
@j-jith
j-jith / miui-fastboot-howto.rst
Last active June 16, 2025 05:00
How to flash MIUI Fastboot ROM from Linux

How to flash MIUI Fastboot ROM from Linux