Skip to content

Instantly share code, notes, and snippets.

@guidocella
guidocella / generate-edl.lua
Last active April 24, 2025 08:33
mpv script to bookmarks scenes in EDL playlists. Press Ctrl+e to mark the start of a scene, then press it a second time to mark the end and append the scene to bookmarks.edl.
local utils = require 'mp.utils'
local start
mp.add_key_binding('Ctrl+e', 'generate-edl', function ()
if start == nil then
start = mp.get_property_native('time-pos')
mp.osd_message('Saved start')
return
end
@guidocella
guidocella / dump-cookies.sh
Last active February 2, 2025 22:28
Convert qutebrowser's cookies to Netscape format
#!/bin/sh
{
echo '# Netscape HTTP Cookie File' # needed by youtube-dl
# There is no attempt to url encode $1, but SQLite already handles
# characters like spaces, so only ? % and # should cause issues.
sqlite3 -separator ' ' "file:${1:-$HOME/.local/share/qutebrowser}/webengine/Cookies?nolock=1" "
SELECT
host_key,
@guidocella
guidocella / remove-steam-link-filter.js
Last active September 11, 2021 04:32
Greasemonkey Steam link filter remover
@guidocella
guidocella / remove-pixiv-link-filter.js
Last active September 11, 2021 04:32
Greasemonkey Pixiv link filter remover
@guidocella
guidocella / avgle-download.sh
Last active June 7, 2024 13:38
Download videos from avgle.com
#!/bin/sh
if [ $# -lt 2 ]; then
echo Usage: avgle-download.sh video_title url_of_last_segment
exit 1
fi
# Visit a video page, open the network tab of the dev tools,
# seek to the end of the video and copy the url of the last .ts segment
# (the .m3u8 playlist is encoded and therefore harder to get).