Skip to content

Instantly share code, notes, and snippets.

@RandomInsano
RandomInsano / 1b-button1.bin.base64
Last active August 27, 2024 15:03
Reverse Engineering an Airoha AB1127-based Bluetooth Selfie button
AAEAAElGAxAHAQBPAA0AXAA3AJMAYQD0ACUBGQAIASEAAgF7AAABIwEJAiwAawKXApoFMQCHBbgA6AagABEGsQACBrMABwa6AAcGwQAAN1cAAkUCAAAAAAAAAB5XAfnRLT9oEFb2aLEcn0FIo7WrrAMByR8EAVL6UenPKMtXW5xHbzFVi7Ge1DcKipEEAf8CAAFRVy8ZntSD/AwAAAAAAFRaVU1JIFNFTEZJRSBTVElDSwAAQCUAIDRWBJQAMiL8AgQ4GBgZgwEAAAAAAAAAAQAYAAATCVRaVU1JIFNFTEZJRSBTVElDSwMDJBEAAAAAAAAAG1YEAgSdBgE6CgEhEAHUCQYIZGQU8dQUAbsnAS4CBiz//y3/xXRWAgFBZQEKq1aJVhYC/v4CBAJYADwWAz6AUAEBUA0CBgYgAQANAQABAQMDAQAPAQMFAw8PFgEBAwQB8TYBAwUCBQUCAQMEAfIJAYEEDgJfAqECSQABAjMCdQK2ZgENAQP/AA0DAQ0BEv8ADQH/AA0C/wANA/8ADQT/ABaWgV2fg2kokTEjkTFtgUl6g2rtg2sJAAAAgU0bgoFxg2uFg2u1g2u6AAAAgpMKg2vTg2v3g2wLg2vfgv2EgpJXg2vrg2ymg2y9g2K4g097g2zMg2zog2ujgd9bg2OUgeIDgeESgeGFgeHBg2n2g2mIg2Lkgdv6g2w/gd3Yg2o3g172gd/6g17KgS+sg2z+g20Dg20IgTGIsVYRAQMFAQICDQQAAAEAAAEAAAEAAAEhAQMYAxvJUQEBgAEPLwC7qwFgrVsArgNsLf/FEzaDYcmDbQ2BX6GCZaeDYpWCGXAAAAAAAACCP9IAAAAAAACRMzyCdkWCdkaDXfeDZHaC/WWBNp62VwABAAAAAACVAosxAAASAW5cEgAN3JAABKXgRAjwAgDUW5AADZp0BPACAVKgAgDeDn4BfzcSAA7t72A7fgF/NxIADUyQADAY7vCj7/D1go6DdZMAo6Oj4JAAMBi0Ywvg/qPg/xIADJmA
@savetheclocktower
savetheclocktower / README.md
Last active April 14, 2026 11:44
Using a rotary encoder as a volume control for the Raspberry Pi

Update on Nov 30, 2025: This Gist is nearly eight years old! These instructions worked back in 2018 for the Pi 3, but recent comments suggest that they may not be sufficient on more recent Pi models and newer versions of Raspberry Pi OS. Be advised.


Using a rotary encoder as a volume control

On my RetroPie machine I wanted a hardware volume knob — the games I play use a handful of emulators, and there's no unified software interface for controlling the volume. The speakers I got for my cabinet are great, but don't have their own hardware volume knob. So with a bunch of googling and trial and error, I figured out what I need to pull this off: a rotary encoder and a daemon that listens for the signals it sends.

Rotary encoder

@GoToLoop
GoToLoop / resizeNN.js
Last active January 2, 2026 23:21 — forked from gncgnc/resizeNN.js
Extends p5.Image to handle nearest neighbor resizing for scaling images w/o blurring.
/**
* Resize the image to a new width and height using nearest neighbor algorithm.
* To make the image scale proportionally,
* use 0 as the value for the wide or high parameters.
* For instance, to make the width of an image 150 pixels,
* and change the height using the same proportion, use resize(150, 0).
* Otherwise same usage as the regular resize().
*
* Note: Disproportionate resizing squashes "pixels" from squares to rectangles.
* This works about 10 times slower than the regular resize.
@Ircama
Ircama / Digispark.md
Last active March 18, 2026 15:34
Configuring the Digispark ATtiny85 board for Arduino IDE and upgrading the bootloader

Configuring the Digispark ATTINY85 board for Arduino IDE and upgrading the bootloader

Warning: this document has to be updated by pointing to https://github.com/SpenceKonde/ATTinyCore

This note describes the configuration of an ATtiny85 based microcontroller development board named Digispark and similar to the Arduino line. It is available in many online marketplaces for roughly 1 dollar (e.g., Ebay, Amazon, AliExpress) and is shipped fully assembled, including a V-USB interface (a software-only implementation of a low-speed USB device for Atmel's AVR microcontrollers). Coding is similar to Arduino: it uses the familiar Arduino IDE and is already provided with a ready-to-use bootloader (

@jimmywarting
jimmywarting / readme.md
Last active July 20, 2026 22:18
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@ksmithut
ksmithut / .dockerignore
Last active January 25, 2025 00:36
Node Docker Compose nodemon
node_modules
@jes
jes / protoproxy.go
Last active October 3, 2025 03:00
Run SSH and HTTP on the same port
package main
import (
"fmt"
"net"
"os"
"strings"
)
func main() {
@viery365
viery365 / index.html
Last active December 3, 2020 16:04
Pure CSS Parallax Scrolling
<header>
<h1>Parallax Effect</h1>
<p>Pure CSS // No JavaScript !</p>
</header>
@flpvsk
flpvsk / recorderWorkletProcessor.js
Last active August 6, 2025 04:28
An example of a recorder based on AudioWorklet API.
/*
A worklet for recording in sync with AudioContext.currentTime.
More info about the API:
https://developers.google.com/web/updates/2017/12/audio-worklet
How to use:
1. Serve this file from your server (e.g. put it in the "public" folder) as is.
@SMUsamaShah
SMUsamaShah / List of JavaScript GUI libraries.md
Last active July 8, 2026 08:31
dat.gui alternatives to create GUI from JavaScript object

JavaScript GUI libraries

These libraries can be used to quickly create a GUI for configureable parameters using sliders, checkboxes, colors pickers etc

  1. Tweakpane https://github.com/cocopon/tweakpane Demo: https://cocopon.github.io/tweakpane/
  2. control-panel https://github.com/freeman-lab/control-panel
  3. ControlKit https://github.com/automat/controlkit.js
  4. guify https://github.com/colejd/guify Main site is down, here is the demo https://jons.website/projects/guify/index
  5. oui https://github.com/wearekuva/oui
  6. Palette.js https://github.com/lehni/palette.js