Skip to content

Instantly share code, notes, and snippets.

View ConfuSomu's full-sized avatar
🏳️‍🌈
enby!

ConfuSomu ConfuSomu

🏳️‍🌈
enby!
View GitHub Profile
@joboet
joboet / 0000-pattern-types.md
Last active March 5, 2026 19:44
Pattern types RFC

Summary

This RFC introduces pattern types, which are subtypes of matchable types that are statically restricted to a subset of the variants of the original type.

Bionic Reader Bookmarklet

This bookmarklet is inspired by Bionic Reader API that is truly incredible. However I have issues with service APIs that are not clear on how they handle the privacy and security of my data. So I made a quick and dirty bookmarklet to do the job locally.

  • Create a new bookmark in your browser
  • Use this script as the address:
javascript:(function(){!function(){window.hasOwnProperty("bionicWordWrapApplied")||(!function(e){var n,t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,null);for(;n=t.nextNode();){for(var o,r=n.parentNode,d=n.nodeValue;o=d.match(/^(\s*)(\S+)/);){d=d.slice(o[0].length),r.insertBefore(document.createTextNode(o[1]),n);var a=Math.ceil(o[2].length/2),c=r.insertBefore(document.createElement("b"),n);c.appendChild(document.createTextNode(o[2].slice(0,a)));var i=r.insertBefore(document.createElement("span"),n);i.appendChild(document.createTextNode(o[2].slice(a)))}n.nodeValue=d}}(document.body),window.bionicWordWrapApplied=!0
@RobFisher
RobFisher / framework_arch.markdown
Last active July 4, 2025 02:25
Install Arch on Framework laptop with BTRFS, encrypted swap and hibernate

See video: https://www.youtube.com/watch?v=BAQ78pBPjjc

Set up laptop

In BIOS, under security, set "Enforce secure boot" to "disabled".

Get install environment working

Keyboard layout for boot env:

localectl list-keymaps | grep uk

loadkeys uk

@codepope
codepope / rgbkeypadcp.py
Created February 15, 2021 21:08
A class (and example) for the Pimoroni Pico RGB Keypad and CircuitPython
import board
import digitalio
import busio
import random
import time
class PicoRGBkeypad:
WIDTH=4
HEIGHT=4
NUM_PAD=WIDTH*HEIGHT
@siedentop
siedentop / Pipfile
Last active August 17, 2020 00:33
Midi Keyboard as Computer Keyboard. Upper case through pressing faster.
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
black = "*"
[packages]
py-midi = "*"
@MechMK1
MechMK1 / bitChecker.c
Created February 19, 2020 13:04
A simple tool to calculate the number of bits differing between the SHA-256 hashes of two strings
/*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictions that recognize copyright laws, the author or authors
* of this software dedicate any and all copyright interest in the
@twilight-sparkle-irl
twilight-sparkle-irl / .XCompose
Last active March 8, 2026 00:07
.XCompose unicode shenanigans pack
# the unicode shenanigans pack for XCompose, by Twilight (synthetic.garden)
# for when you need obfuscation
# Please use these wisely, using them for everything everywhere is dumb and causes accessibility issues.
# If that for some reason isn't a good enough reason for you: using these excessively will cause them to lose their power.
# Don't be a dumbass.
# breakers
# used to break up text when lookalikes can't be used
@ksamuel
ksamuel / download_bookmarks.py
Created December 20, 2019 12:16
A quick and dirty python script to download all firefox bookmarks as stand alone static pages
"""
usage: download_bookmarks.py [-h] [--concurrency [CONCURRENCY]] [--directory DIRECTORY] bookmarks
positional arguments:
bookmarks The path to the sqlite db file containing
the bookmarks. It's the places.sqlite file
in your default profile dir.
optional arguments:
-h, --help show this help message and exit
@aallan
aallan / throttled.sh
Last active May 11, 2025 18:07
Script to parse the output of the 'vcgencmd get_throttled' command on a Raspberry Pi
#!/bin/bash
# https://retropie.org.uk/forum/topic/2295/runcommand-warning-if-voltage-temperature-throttling
#Flag Bits
UNDERVOLTED=0x1
CAPPED=0x2
THROTTLED=0x4
HAS_UNDERVOLTED=0x10000
HAS_CAPPED=0x20000
@remarkablemark
remarkablemark / tmux-cheatsheet.md
Last active March 21, 2021 10:26
tmux cheatsheet

tmux cheatsheet

PREFIX is the prefix key (Ctrl-b is the default). ^d means Ctrl-d. ^D means Ctrl-Shift-d.

Action Command
start a new session tmux
tmux new
tmux new-session
reattach an attached/detached session tmux attach``tmux attach-session