Skip to content

Instantly share code, notes, and snippets.

@meoiswa
meoiswa / image2.py
Last active December 23, 2023 11:30
Badger2040 image renderer with binary raw support
import os
import badger2040
from badger2040 import HEIGHT, WIDTH
import badger_os
import jpegdec
TOTAL_IMAGES = 0
@meoiswa
meoiswa / image_to_binary.py
Created December 23, 2023 11:01
badger2040 image-to-binary
#!/usr/bin/env python3
"""
Converts images to binary 1's and 0's for display on the Badger2040.
Images fed to this program should be 296x128 pixels in size, and should be black and white.
Does not do any form of image processing, so it's up to the user to make sure the image is
dithered, grayscale, and the right size.
"""
@meoiswa
meoiswa / extract_answers.ps1
Created October 28, 2023 11:28
Limbo.pck prompt-answer extractor
param (
[string]$inputFile,
[string]$outputFile
)
$pattern = '\[node name="([^"]+)" parent="([^"]+)"[\S\s]*?\s*text = "([^"]+)"\s*answer = "([^"]+)"'
$tuples = @()
$fileContent = Get-Content -Path $inputFile -Raw
### Keybase proof
I hereby claim:
* I am meoiswa on github.
* I am meoiswa (https://keybase.io/meoiswa) on keybase.
* I have a public key ASCwKe1zlIjN-ltlODhWpkAMv-58U21slZ3nFNIyOfEXtAo
To claim this, I am signing this object:
@meoiswa
meoiswa / Mouse4PTT.ahk
Created November 12, 2019 12:45
Use Mouse4 for Push To Talk without triggering back navigation
; Remaps Mouse4 (Comonly "back") to Ctrl+Mouse4.
; Allows using Mouse4 for Push To Talk, without triggering back navigation
XButton1::return ;Disables XButton1 (Mouse 4)
!XButton1::return ;Disables Alt+XButton1
+XButton1::return ;Disables Shift+XButton1
#XButton1::return ;Disables Win+XButton1
^XButton1::Send, {XButton1} ;Ctrl+XButton1 Sends XButton1