Skip to content

Instantly share code, notes, and snippets.

@aqt
aqt / miniflux-ignore-youtube-shorts.md
Created December 17, 2023 20:00
Mark new entries, that are likely a youtube short, as read in Miniflux

Miniflux version 2.0.51

Youtube doesn't distinguish shorts from regular videos in their rss feed. The only way to know (without changes to Miniflux) is to enable FETCH_YOUTUBE_WATCH_TIME and filter out videos by duration. This does mean some videos may be caught in the crossfire, but in my case that's not very likely and it's an acceptable loss.

I know Miniflux recently added webhooks but I don't feel like reading into it, the API in general, and setting everything up. Less effort to just create a trigger.


@aqt
aqt / Export Tags To Different Sprite Sheets.lua
Created July 13, 2023 21:04
Aseprite export tags to sprite sheets (WebP)
-- Adapted from https://github.com/aseprite/Aseprite-Script-Examples/blob/68ed42647ef9990d6a27c4244277f83d6de8a69b/Export%20Tags%20To%20Different%20Sprite%20Sheets.lua
-- It worked great except that I prefer WebP. I added some more opinionated
-- changes while at it.
--
-- Changes include:
-- 1. WebP instead of PNG - Smaller, still supporting lossless and transparency
-- 2. Removed data generation - I don't need it
-- 3. Removed superfluous overwrite confirmation - Aseprite already asks
-- 4. Underscore separating file name - To fit my naming convention
-- 5. Lowercase tag in filename - Compatibility between OSs
@aqt
aqt / miniflux-ignore-old-entries.md
Last active March 31, 2024 09:05
Mark new entries, with an old publish date, as read in Miniflux

Miniflux version 2.1.2 introduces a new configuration parameter FILTER_ENTRY_MAX_AGE_DAYS. One difference in behavior is that that approach will ignore new entries, while this trigger adds them marked as read.


Deprecated

Miniflux version 2.0.45

This problem has annoyed me for a while. Old entries are suddenly added to the feeds in my Miniflux instance. Sometimes as old as several years.

@aqt
aqt / enable_firefox_maximize.ahk
Created August 26, 2021 17:05
Firefox disables maximization on popup window types, this autohotkey script re-enables that functionality
#Persistent
Gui +LastFound
shellMessage(wParam, lParam) {
if (wParam = 1) { ; HSHELL_WINDOWCREATED
hWnd := lParam
WinGetClass, winClass, ahk_id %hWnd%
if (winClass = "MozillaDialogClass") {
Sleep, 200 ; Quick fix, no effect if too fast
@aqt
aqt / the_messenger_save_decoder.js
Last active May 8, 2024 17:44
Decode/encode save files used by the game The Messenger
#!/usr/bin/env node
/*
If you run the script on an encoded file it will output a decoded file and
vise versa, because the action used to encode/decode is identical. The save
file format when decoded is plaintext JSON, which you can edit with your
favorite text editor.
You can find the save file at the following path. Please make a backup of the
@aqt
aqt / caps_lock_dual.ahk
Last active July 3, 2021 15:57
Swap the behavior of Caps Lock with more useful functions; Use it as an Escape key and/or provide comfortable access to the arrow keys
; This script disables the normal behavior of Caps Lock,
; and makes the key more useful for programmers.
;
; Caps Lock + h/j/k/l -- Arrow keys
; Just Caps Lock -- Escape (on key released)
; Both shift keys -- Toggle Caps Lock (in case it's needed)
#SingleInstance force
SetCapsLockState, AlwaysOff
@aqt
aqt / media_fastforward_rewind.ahk
Last active July 11, 2020 21:29
Skip forwards/backwards in Spotify track
; Currently it skips 15 seconds, but this may change as Spotify updates their software.
; AutoHotkey used for simplicity, it's just using the regular winapi.
; Defined in Winuser.h - https://docs.microsoft.com/en-us/windows/desktop/inputdev/wm-appcommand
WM_APPCOMMAND := 0x0319
APPCOMMAND_MEDIA_FAST_FORWARD := 49
APPCOMMAND_MEDIA_REWIND := 50
; "Control" + the keyboard media keys "next"/"previous"
^Media_Next:: PostMessage, WM_APPCOMMAND,, APPCOMMAND_MEDIA_FAST_FORWARD << 16,, ahk_exe Spotify.exe