Skip to content

Instantly share code, notes, and snippets.

@shiona
shiona / swayflameshotconfig
Last active February 9, 2026 10:26
sway + flameshot config
# Add the two non-commented lines to your sway config file (likely ~/.config/sway/config)
# The first one makes the darkened desktop overlay actually match the desktop and cover it fully
# The second allows the save dialog to appear
# Tested on
# % sway --version
# sway version 1.12-dev-f4aba225 (Dec 5 2025, branch 'master')
# % flameshot --version
# Flameshot v13.3.0 ()
@shiona
shiona / dd2_knee.lua
Created January 28, 2026 21:58
Double Dragon 2: The Revenge flying knee timing trainer
while (true) do
-- Highest byte denotes looking left or right, would be nice
-- to drop that, but lua 5.1 doesn't seem to have bitwise operators
local CROUCHING_LEFT = 0x06;
local CROUCHING_RIGHT = 0x86;
local sprite = memory.readbyte(0x00c7);
local kneetimer = memory.readbyte(0x0055);
gui.box(60, 186, 200, 190, "red");
if (sprite == CROUCHING_LEFT or sprite == CROUCHING_RIGHT) then
if (kneetimer == 0x06 or kneetimer == 0x07) then
@shiona
shiona / sway_mouse_capture
Last active March 25, 2025 22:49
swaywm mouse capture
# This file is supposed to be a part of swaywm config file (.config/sway/config)
# The format for both lines is:
# bindsym [key combo] exec swaymsg 'input "[mouse identifier from 'swaymsg -t get_inputs']" map_to_output "[monitor from swaymsg -t get_outputs OR * to uncapture"'
bindsym $mod+x exec swaymsg 'input "1133:49970:Logitech_Gaming_Mouse_G502" map_to_output "*"'
bindsym $mod+c exec swaymsg 'input "1133:49970:Logitech_Gaming_Mouse_G502" map_to_output "DP-1"'
# of course you can just run the capture/free from a script and not bother with the key bindings, in that case start from "swaymsg", like:
# swaymsg 'input "1133:49970:Logitech_Gaming_Mouse_G502" map_to_output "DP-1"'
@shiona
shiona / wr.sh
Created April 13, 2023 15:22
Wappuradio FM recorder
# demux is from https://github.com/windytan/stereodemux
# which is also source for the rtl_fm command
while true; do
rtl_fm -M fm -s 192k -g 50 -F 9 -f 101.6M | \
~/bin/demux -r 192k -R 44.1k | \
ffmpeg -ac 2 -ar 44100 -f s16le -i pipe: \
-acodec flac \
-f segment \
#!/usr/bin/env bash
# Licensed under GNU GPL 2.0 by Ingo "ninelore" Reitz <[email protected]>
#
# Contributing: famfo (famfo#0227)
# Testing: G4rrus#3755
#
# Version 1v17-3
_SCRIPTVER="1v17-3"
@shiona
shiona / qr.feh.sh
Last active August 14, 2025 10:43
Show clipboard content in a qr code.
#!/usr/bin/sh
# This version uses feh. Much cleaner.
# Fetch data, I prefer primary, but you can edit these to your liking.
if [ $XDG_SESSION_TYPE = "wayland" ]; then
data="${1:-$(wl-paste -p)}"
elif [ $XDG_SESSION_TYPE = "x11" ]; then
data="${1:-$(xclip -o)}"
fi
@shiona
shiona / threadreader link generator.js
Created September 30, 2021 08:47
Violentmonkey script that adds a link to threadreader into twitter
@shiona
shiona / ultrastardx-ffmpeg.patch
Created September 13, 2020 17:30
Patch to circumvent all version checks for ffmpeg. Allows compilation, but is likely to cause problems further along the way.
diff --git a/src/lib/ffmpeg-4.0/avcodec.pas b/src/lib/ffmpeg-4.0/avcodec.pas
index cef8b16e..f14cc3b6 100644
--- a/src/lib/ffmpeg-4.0/avcodec.pas
+++ b/src/lib/ffmpeg-4.0/avcodec.pas
@@ -84,7 +84,7 @@ const
(* Supported version by this header *)
LIBAVCODEC_MAX_VERSION_MAJOR = 58;
- LIBAVCODEC_MAX_VERSION_MINOR = 54;
+ LIBAVCODEC_MAX_VERSION_MINOR = 99;
@shiona
shiona / README
Created November 5, 2019 10:17
shell for urc-8800
You can compile the source, but you need a compatible buildchain.
One can be found at https://github.com/jlaunonen/mips-linux-uclibc
to unpack the shell:
base64 -d shell.gzip.b64 | gunzip -c > shell
to upload the shell to the device it needs to be served over http(s).
You are free to use whatever, python3 can be used with:
python3 -m http.server (in the same directory as the shell binary)
@shiona
shiona / message_bytes.txt
Created January 11, 2018 09:06
One For All Nevo URC-8800 messaging
chan up: 04
chan dw: 05
vol up: 06
vol dw: 07
mute: 08
num 1: 09
num 2: 0a
...