Skip to content

Instantly share code, notes, and snippets.

@cutiepoka
cutiepoka / restartTorrents.py
Created April 13, 2024 12:02
Restart web QBittorrent torrents that are stuck in the 'not contacted yet' state.
from qbittorrentapi import Client
# instantiate a Client using the appropriate WebUI configuration
client = Client(host='https://localhost:8080', username='YOUR_USERNAME', password='YOUR_PASSWORD',VERIFY_WEBUI_CERTIFICATE=False)
# Loop through all torrents
for torrent in client.torrents_info(status_filter='completed', category='named_category_that_is_an_issue'):
# Check if the tracker status is 'not contacted yet'
for tracker in torrent.trackers:
if tracker.status == 1:
@cutiepoka
cutiepoka / gist:a9347c68bfcf29060926a8af46bb1701
Created October 6, 2023 18:18
Youtube allow ads popup blocker
// ==UserScript==
// @name youtube popup killer
// @namespace http://tampermonkey.net/
// @version 0.3
// @description try to take over the world!
// @author Selbereth
// @match https://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
G28 ; home all axes
G1 Z5 F5000 ; lift nozzle
M420 S1
M109 S[first_layer_temperature]
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
G1 X20 Y5.1 Z0.28 F5000.0 ;Move to start position
G1 X200.0 Y5.1 Z0.28 F1500.0 E15 ;Draw the first line
@cutiepoka
cutiepoka / gist:5ae9f0085160e53b801ade8697083c23
Created July 17, 2023 21:58
download pictures from reddit
async function start() {
await dosomething(".expando-button");
console.log('next step')
await wait(20000)
await loopWheel();
console.log('next step')
await wait(20000)
await dosomething("button.res-media-controls-download.res-icon");
console.log('next step')
await wait(20000)