Skip to content

Instantly share code, notes, and snippets.

@xzin-CoRK
xzin-CoRK / arr-restore.py
Last active February 5, 2025 22:26
Restore your download history with original filenames and hardlinks from your radarr database
###########################
### *ARR RESTORE v1.2 ###
### by xzin ###
###########################
# About #
# This script automatically restores the original downloaded media files from your Radarr and Sonarr databases
# These files will be named as they were when originally downloaded, before Radarr/Sonarr performed any renaming
# These files will also be hardlinked to your existing media, so you won't incur additional storage space usage
@nielsvanvelzen
nielsvanvelzen / jf-dev-auth.md
Last active July 12, 2025 04:32
Jellyfin API Authorization

Jellyfin API Authorization

To start using the Jellyfin API, authorization is probably the first thing you'll need to do. Jellyfin's authorization options can be a bit confusing because there are a lot of deprecated options.

Generally there are three ways to authenticate: no authorization, user authorization with an access token or authorization with an API key. The first way is easy, just do nothing. But most often you'll need to use either the access token or API key.

Sending authorization values

There are multiple methods for transmitting authorization values, however, some are outdated and scheduled to be removed. It's recommend to use the Authorization header. If header auth isn't an option, the token may be sent through the ApiKey query parameter. Sending secure data in a query parameter is unsafe as the changes of it leaking (via logs, copy-paste actions or by other means) are high. Only use this method as a last resort.

@Roardom
Roardom / qbit-fastresume-path-changer.py
Created December 7, 2021 15:55
Replace paths easily in qBittorrent .fastresume (useful when switching from windows to linux)
import os
import re
# Insert the path where you keep your fast resume files here.
# Make a backup first!!!
torrentsDir = r'/torrents/'
# Insert paths to be replaced here. Dictionary key is current path. Dictionary value is new path
# If left empty, the script will only detect paths
@Bert-Proesmans
Bert-Proesmans / qos-all.auto.rsc
Last active March 22, 2025 06:02
Mikrotik Routerboard QOS script
# Creation Date: November 3, 2018
:local Version "2.0"
:local LASTUPDATE "05/10/2019"
# Tested with RouterOS 6.43.4
#
# Mikrotik script to implement QoS on internet connections.
# The script makes use of Address Lists, Firewall rules (Mangle) for connection tagging, and Queue Trees.
# The script will remove applied rules from previous runs before applying.
#
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active July 4, 2025 07:01
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@niksumeiko
niksumeiko / git.migrate
Last active July 1, 2025 18:41
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.