Skip to content

Instantly share code, notes, and snippets.

View maksii's full-sized avatar

maksii

  • Ukraine
View GitHub Profile
(async function () {
// Helper function to download JSON as a file
function downloadJSON(data, filename) {
const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = filename;
document.body.appendChild(a);
a.click();
// donwload full page from https://toloka.to/tracker.php?nm=
// Function to simulate clicks with a delay
async function clickAndDownload() {
// Select all anchor elements with the specified class and href pattern
const downloadLinks = Array.from(document.querySelectorAll('a.genmed[href^="download.php?id="]'));
for (let i = 0; i < downloadLinks.length; i++) {
const link = downloadLinks[i];
// Simulate a click on the link
(async function() {
const qbittorrentUrl = window.location.origin; // Automatically gets the base URL of the Web UI
const apiPath = '/api/v2';
const trackerToAdd = "NEW TRACKER URL HERE"; // Replace with the actual tracker URL
const specificTrackerToRemove = "OLD TRACKER URL HERE"; // What should be removed
// Helper function to make API requests
async function apiRequest(endpoint, method = 'GET', body = null) {
const options = {
method: method,
// Function to simulate clicks on buttons
function simulateClicks() {
// Select all anchor elements with the specified class
const buttons = document.querySelectorAll('a.torrent-search--list__file.form__standard-icon-button');
// Retrieve the clicked URLs from local storage or initialize an empty array
const clickedUrls = JSON.parse(localStorage.getItem('clickedUrls')) || [];
// Log the number of buttons found
console.log(`Found ${buttons.length} button(s).`);
@maksii
maksii / 1. audio_extract_sound.ps1
Last active October 12, 2024 09:07
windows PowerShell scripts to batch(bulk) ffmpeg commands to manipulate media. require ffmpeg installed
# Check FFmpeg availability
$ffmpegPath = "ffmpeg" # Default to ffmpeg in PATH
# Check FFprobe availability
$ffprobePath = "ffprobe" # Default to ffprobe in PATH
# Function to check if ffmpeg exists in PATH
function Check-FFmpeg {
try {
$output = & $ffmpegPath -version 2>&1
@maksii
maksii / utpblockvote.js
Last active August 22, 2024 18:20
utpblockvote.js
// ==UserScript==
// @name UTP Request Checker
// @namespace Violentmonkey Scripts
// @version 1.2.1
// @description Compare amounts and modify the vote button on UTP requests.
// @match https://utp.to/requests/*
// @grant none
// @updateURL https://gist.github.com/maksii/b8c4bf8bdf0de841532a3b4320cf9a1a.js
// @downloadURL https://gist.github.com/maksii/b8c4bf8bdf0de841532a3b4320cf9a1a.js
// ==/UserScript==
@maksii
maksii / linkedin auto-inviter
Last active December 19, 2020 16:54
Script to automatically add connections from "People You May Know" page
var inviter = {} || inviter;
inviter.userList = [];
inviter.className = 'button-secondary-small';
inviter.refresh = function () {
window.scrollTo(0, document.body.scrollHeight);
window.scrollTo(document.body.scrollHeight, 0);
window.scrollTo(0, document.body.scrollHeight);
};