Skip to content

Instantly share code, notes, and snippets.

@johnmcfarlane
johnmcfarlane / begin(C++).md
Last active March 12, 2026 20:40
Resources for C++ beginners
@crittermike
crittermike / wget.sh
Last active March 12, 2026 20:31
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@smealum
smealum / bch2obj.py
Created March 6, 2014 16:51
pokemon X/Y simple model/texture parser
import struct
import math
import os
import sys
if sys.version > '3':
buffer = memoryview
def getWord(b, k, n=4):
return sum(list(map(lambda c: b[k+c]<<(c*8),range(n))))
@mewset
mewset / playwright-arch-linux-fix.md
Created January 5, 2026 19:59
Playwright on Arch Linux - use system Chromium instead of bundled

Playwright on Arch Linux - just use system Chromium

So you're on Arch and Playwright is being a pain? Yeah, same. Here's what happens:

$ npm init playwright@latest
BEWARE: your OS is not officially supported by Playwright; installing dependencies for ubuntu24.04-x64 as a fallback.
Installing dependencies...
sh: line 1: apt-get: command not found
Failed to install browsers
@DreamShaded
DreamShaded / playwright-arch-linux-fix.md
Created February 6, 2026 21:06 — forked from mewset/playwright-arch-linux-fix.md
Playwright on Arch Linux - use system Chromium instead of bundled

Playwright on Arch Linux - just use system Chromium

So you're on Arch and Playwright is being a pain? Yeah, same. Here's what happens:

$ npm init playwright@latest
BEWARE: your OS is not officially supported by Playwright; installing dependencies for ubuntu24.04-x64 as a fallback.
Installing dependencies...
sh: line 1: apt-get: command not found
Failed to install browsers
@formatBCE
formatBCE / sendspin-player-1.yaml
Last active March 12, 2026 20:02
Sendspin example for ESP32S3 with 2 or 8 MB of PSRAM and DAC (like MAX98357 or UDA1334)
esphome:
name: sendspin-player-1
friendly_name: sendspin-player-1
min_version: 2026.2.0
esp32:
board: esp32-s3-devkitc-1
cpu_frequency: 240MHz
variant: esp32s3
flash_size: 16MB
@scholtes
scholtes / readme.md
Last active March 12, 2026 19:47
Wordle dictionary

Deprecated!

⚠This gist will remain available for posterity, but be aware that Wordle no longer uses these dictionaries.⚠

Wordle dictionary

Wordle is a web browser game that you can play at this link. You get 6 chances to guess a single 5 letter word and there is only 1 word per day.

@osy
osy / README.md
Last active March 12, 2026 19:37 — forked from akihikodaki/README.en.md
QEMU on Apple Silicon with Vulkan support

QEMU on Apple Silicon with Vulkan support

The following is taken from https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5 with modifications to introduce Vulkan support. Since we need custom patches to QEMU, virglrenderer, MoltenVK, and libepoxy, the provided script will pull the right refs and build everything with the right params. Feel free to inspect the script to find the source for all the modifications. We are actively working to upstream everything so please do not build anything long-term with these patches.

Testing

Prerequisites

  • Xcode (relatively recent version)
  • Vulkan SDK for macOS (Make sure to select "System Global Installation" during Select Components.)
@leodutra
leodutra / bitwise-hacks.js
Last active March 12, 2026 20:12
Fast Int Math + Bitwise Hacks For JavaScript
/**
* Bitwise Mathematics Utilities
*
* A collection of fast bitwise operations for integer mathematics.
* These functions prioritize performance over readability and should be used
* when micro-optimizations are critical (game engines, real-time applications).
*
* References:
* - http://michalbe.blogspot.com.br/2013/03/javascript-less-known-parts-bitwise.html
* - http://jsperf.com/bitwise-vs-math-object