Skip to content

Instantly share code, notes, and snippets.

@werrpy
werrpy / shittytitles.html
Last active May 19, 2020 02:19
dots..............................
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
let files = [
"Some.Release.2020.9000p.UHD.VR.HDR.EXTREME.5.1.x900-AMAZIN"
]
files.forEach(function(f) {
let newValue = (function (str) {
// 1) letter and letter
str = str.replace(/([\D])\.(?=[\D])/g, "$1 ")
// 2) number and letter
@werrpy
werrpy / shittynames.py
Last active March 1, 2020 00:49
shitty names
import argparse, re, os
import torrent_parser as tp
def get_title(name):
# remove extension
title = os.path.splitext(name)[0]
# replace dots with spaces that are between:
# 1) letter and letter
# 2) number and letter
@werrpy
werrpy / crontab -e
Created February 21, 2020 19:05
crontab demo
*/30 * * * * /USER/bin/example.sh >/dev/null 2>&1
@werrpy
werrpy / tmdb
Created November 15, 2019 00:08
episodes using tmdb
filebot.sh -rename -non-strict --format "{n.replaceAll(/:/, ' -')} ({y}) - {s00e00}" --db TheMovieDB::TV
# find all imagebam urls with this regex
# https?:\/\/(www\.)?imagebam\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)
# gives us something like
# http://www.imagebam.com/image/9e31091131177484
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
# headless chrome
@werrpy
werrpy / backup.sh
Last active July 15, 2019 23:56
rutorrent + deluge watch fast rss
#!/bin/bash
tar -cvf "setup.tar" --exclude .config/deluge/state* .config/deluge/ www/USERNAME.SERVER/public_html/rutorrent/
@werrpy
werrpy / fixSpoiler.user.js
Created June 5, 2019 01:43
UNIT3D fix spoilers
// ==UserScript==
// @name UNIT3D Fix Spoiler
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @grant none
// ==/UserScript==
(function() {
@werrpy
werrpy / unrars.sh
Last active May 25, 2019 03:33
¯\_(ツ)_/¯
for D in `find . -type d`; do
echo "${D}"
cd "${D}"
unrar .
cd ..
done
@werrpy
werrpy / RSS Manager
Last active July 23, 2019 19:07
RSS Manager
Filter: /(.*)/i
Exclude: /(3d|extras|m2ts|mk3d)/i