Skip to content

Instantly share code, notes, and snippets.

View mikeri's full-sized avatar

Michael Ilsaas mikeri

View GitHub Profile
@mikeri
mikeri / instagram-frame-skip.user.js
Created August 24, 2026 17:42
instagram-frame-skip.user.js
// ==UserScript==
// @name Instagram Frame Skip
// @namespace http://mikeri.net/insta-frame-skip
// @version 1.0.0
// @description Adds frame-by-frame step buttons to Instagram videos. Buttons appear only while a video is paused. Touch friendly - works on mobile userscript managers.
// @author mikeri
// @match https://www.instagram.com/*
// @match https://instagram.com/*
// @run-at document-start
// @grant none
@mikeri
mikeri / finn-eukontroll.user.js
Created June 23, 2026 19:53
Viser frist for neste EU-kontroll i søkeresultatene på finn.no.
// ==UserScript==
// @name Finn.no – EU-kontroll i søkeresultater
// @namespace https://mikeri.net/finn-eukontroll.user.js
// @version 1.0
// @description Viser frist for neste EU-kontroll (periodisk kjøretøykontroll) rett i bilsøket på finn.no. Henter registreringsnummer fra annonsesidene og slår opp hos Statens vegvesen.
// @author Michael Ilsaas
// @match https://www.finn.no/mobility/search/car*
// @match https://www.finn.no/car/used/search.html*
// @run-at document-idle
// @connect kjoretoyoppslag.atlas.vegvesen.no
@mikeri
mikeri / snapchat-fix.user.js
Created June 9, 2026 16:34
Snapchat userscript to allow saving media
// ==UserScript==
// @name Snapchat Web - Stay Viewing + Save Media
// @namespace https://mikeri.net/snapchat-fix
// @version 1.2.0
// @description (1) Stops Snapchat Web from detecting when the browser window loses/regains focus, so the "You are no longer viewing." overlay never appears. (2) Replaces the "Looks like you're trying to take a screenshot!" right-click toast on images/videos with a real "Save image/video" option.
// @author mi
// @match https://www.snapchat.com/*
// @match https://web.snapchat.com/*
// @run-at document-start
// @grant none
@mikeri
mikeri / youtube-summary.user.js
Created June 7, 2026 09:49
Youtube AI summary
// ==UserScript==
// @name YouTube AI Summary (Open WebUI)
// @namespace https://mikeri.net/youtube-summary
// @version 1.0.0
// @description Summarize the current YouTube video with an OpenAI-compatible API (Open WebUI). Adds a "Summary" button between Thanks and the ⋯ menu, and shows the result in the sidebar above the suggestions.
// @match https://www.youtube.com/watch*
// @run-at document-idle
// @grant GM_xmlhttpRequest
// @grant GM_getValue
// @grant GM_setValue
@mikeri
mikeri / magnet-to-transmission.user.js
Created June 7, 2026 07:40
Add magnet links to Transmission via RPC on click
// ==UserScript==
// @name Magnet to Transmission
// @namespace https://mikeri.net/magnetadd
// @version 1.0.0
// @description Click a normal magnet: link to add it straight to Transmission via its RPC API.
// @author mikeri@mikeri.net
// @match *://*/*
// @run-at document-idle
// @grant GM_xmlhttpRequest
// @grant GM_getValue
@mikeri
mikeri / xattr_metadata.py
Last active January 5, 2024 23:59
Ranger plugin for storing metadata in extended file attributes
# Ranger plugin for storing metadata in extended file attributes
# Requires Python 3.3
# drop it in ~/.config/ranger/plugins
from ranger.ext.openstruct import DefaultOpenStruct as ostruct
import ranger.core.metadata
import os
def get_metadata(_, filename):
@mikeri
mikeri / cssembed.py
Created May 6, 2022 08:01
CSS image/file embedder (generates data uri)
import base64
import argparse
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument("file")
args = parser.parse_args()
mime_args = ("mimetype", "-b", args.file)
mime_type = subprocess.run(mime_args, capture_output=True).stdout.decode().strip()
@mikeri
mikeri / ocr-copy.sh
Last active June 27, 2021 21:38
Mark an area of the screen, convert it to text and put the text in clipboard
#!/bin/bash
sleep .1
scrot --select /tmp/ocr.png
tesseract -c page_separator="" /tmp/ocr.png /tmp/ocr-out
xclip -selection clipboard -i < /tmp/ocr-out.txt
rm /tmp/ocr.png
rm /tmp/ocr-out.txt
@mikeri
mikeri / scc.zsh-theme
Last active May 18, 2020 11:20
SCC zsh theme
RPROMPT='$(git_prompt_info)%F{yellow}%n%{$reset_color%}%F{240}@%F{blue}%m%{$reset_color%}%(?,,%F{red} [%?]%{$reset_color%})'
PROMPT='%F{240}%25<...<%F{cyan}%~%F{yellow}%B>%b%{$reset_color%}%f '
ZSH_THEME_GIT_PROMPT_PREFIX="%F{240}(%F{246}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%F{240})%F{red}x%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%F{240})%{$reset_color%}"
@mikeri
mikeri / mutool-pdf.thumbnailer
Created May 11, 2019 12:14
PDF thumbnailer for freedesktop.org using mutool. Very fast.
[Thumbnailer Entry]
TryExec=mutool
Exec=mutool draw -w %s -h %s -o %o %i 1
MimeType=application/pdf;application/x-pdf;image/pdf;