Skip to content

Instantly share code, notes, and snippets.

View ddrescue_directories.py
#!/usr/bin/env python
import os, shlex, subprocess
from tqdm import tqdm
# ddrescue directories instead of a whole drive
# creates directories recursively and ddrescues files into them
def fs (line):
import subprocess
PIPE = subprocess.PIPE
View qbittorrent_plugin_filter_files.py
#! /usr/bin/env python
import json
import requests
import os
import time
# plugin for qBittorrent to filter out files in torrents by name or extension
# Enable web-interface.
View qbittorrent_plugin.py
#! /usr/bin/env python
import json
import requests
import os
# plugin for qBittorrent
# Enable web-interface.
# Check "Bypass authentication for localhost"
View xbindkeys_per_app.sh
#!/bin/bash
# program-specific xbindkeys bindings
# there's a tool called `autokey`, which does this, but unlike xbindkeys, it doesn't catch mouse buttons
# doesn't interfere with main xbindkeys
# `pacman -S xbindkeys xdotool`
# `sleep 3 && cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm`
@oltodosel
oltodosel / better_pics_from_google.py
Created February 22, 2015 20:49
Using google script seeks better quality copies of given images.
View better_pics_from_google.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys, os, re, io
import requests, queue, threading
from PIL import Image
# Using google script seeks better quality copies of given images.
# Parses given dir with images, seeks similar with google and if there is a similar enough pic with bigger width, script replaces/adds it.