Skip to content

Instantly share code, notes, and snippets.

@Natanel-Shitrit
Natanel-Shitrit / fastresume-migrate.py
Created October 13, 2023 21:16
qBittorrent FastResume Migration Script
import argparse
import os
import pprint
import shutil
from typing import Dict, List, Optional
import bencodepy
BENCODE_TYPE = bytes | List['BENCODE_TYPE']
@VoidAny
VoidAny / qbittorrent2transmission.py
Last active October 21, 2024 12:56
This script uses the transmission-rpc interface to add all of the torrents from a qBittorrent BT_backup to your transmission-daemon (no rehashing required too!). transfer torrents from qBittorrent to transmission
#!/usr/bin/env python3
"""
This script will add all the torrents in the BT_backup folder to transmission
It will also add the labels and download directory from the corresponding quickresume file
Once a torrent is added, it will be renamed to .added so it won't be added again (if the script is run again)
Make sure to edit the Client() settings to match your transmission settings and the path to the BT_backup folder
Run:
@rany2
rany2 / 01-maxwlanmtu
Last active January 9, 2024 14:25
OpenWRT workaround for inability to set MTU for WLAN interfaces
#!/bin/sh
# Ensure that WLAN interface MTU is set to the maximum
# permitted value to prevent issues when attached to a
# bridge with jumbo MTU.
#
# Do not attempt to use standard UCI configuration
# in /etc/config/network and set the MTU with a config
# of type interface. It does not work consistently
# and in the best case works for the first WLAN
@jmceleney
jmceleney / xiaomi-enable-mesh-telnet.py
Last active January 3, 2025 11:00
Python3 file that enables netmode4 on a Xiaomi RB01 AX3200 router
import ssl
import socket
# This script simply replays one side of an intercepted conversation between two Xiaomi
# RB01 (International) AX3200 routers negotiating meshing.
# In effect the script poses as a mesh slave, which causes the mesh master to enable netmode4.
# Enabling netmode is needed as one step in unlocking the router and flashing OpenWrt.
# The router should already have been taken through basic set-up before running this script.
# Netmode4 can be confirmed with curl by requesting the following URL, where ${token} is the "stok"
# variable from your admin session:
@neilchetty
neilchetty / Sign-Android-Build.md
Last active December 6, 2024 00:30
Guide To Sign Android Build Update With Private Release Keys

Index

  1. Generating signing keys (Part 1)
  2. Generating signing keys (Part 2)
  3. Making signed build (recovery)
  4. Making signed build (fastboot)
  5. Making incremental update

Requirements

All you need is an android buildsystem (I would recommend you to use lineageos)

@adduc
adduc / install.sh
Last active August 24, 2021 09:23
My installation of mercurial, tortoisehg, and hg-git on Ubuntu 20.04 and newer
#!/bin/bash
TARGET_DIR=/opt/repos/third-parties
HG_GIT_VERSION=${1:-default}
HG_RELEASE_VERSION=${2:-5.5.2}
HG_REPO_VERSION=${3:-stable}
TORTOISEHG_VERSION=${4:-stable}
update() {
# Update packages
@mosquito
mosquito / README.md
Last active April 13, 2025 18:03
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@mefarazath
mefarazath / GagSsl.java
Last active June 1, 2022 16:07 — forked from chalup/GagSsl.java
Get OkHttpClient which ignores all SSL errors.
private static OkHttpClient getUnsafeOkHttpClient() {
try {
// Create a trust manager that does not validate certificate chains
final TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
@Override
public void checkClientTrusted(java.security.cert.X509Certificate[] chain,
String authType) throws CertificateException {
}
#!/bin/bash
# Prerequisites: http://wiki.openwrt.org/doc/howto/buildroot.exigence
# Additionally JDK is needed
generate_buildenv() {
# Prepare build enviroment
mkdir lede_build
cd lede_build
git clone https://github.com/lede-project/source.git
@mmrko
mmrko / save-load-docker-images.sh
Last active January 30, 2023 10:23 — forked from lalyos/save-all-images.sh
Script to (selectively) save/load multiple Docker images
#!/usr/bin/env bash
# Script to (selectively) save/load multiple Docker images to/from a directory.
# Run ./save-load-docker-images.sh for help.
set -e
directory=$PWD
filter=""
compress=0