Skip to content

Instantly share code, notes, and snippets.

@pcroland
pcroland / ptp_cp.user.js
Created November 16, 2023 21:14
PTP copy description
// ==UserScript==
// @name Copy Torrent Descriptions
// @version 5
// @match https://passthepopcorn.me/torrents.php*id=*
// @namespace https://passthepopcorn.me/user.php?id=111982#copydescriptions
// @grant none
// ==/UserScript==
'use strict';
@pcroland
pcroland / mux.sh
Last active November 1, 2023 20:41
mux seasons automatically
#!/bin/zsh
title="The.Righteous.Gemstones"
s="02"
orig_lan="eng"
tag_720="720p.AMZN.WEB-DL.DDP5.1.H.264.HUN.ENG-group"
tag_1080="1080p.AMZN.WEB-DL.DDP5.1.H.264.HUN.ENG-group"
for e in "$1"; do
output="$title".S"$s"E"$e"
vid_480=(--language 0:"$orig_lan" -A -S -M -T --no-global-tags --no-chapters vid/s"$s"e"$e"_480.mkv)
#!/usr/bin/python3
from sys import argv as Args
import datetime
def main():
filename = Args[3]
for i, arg in enumerate(Args):
if '/' in arg:
@pcroland
pcroland / python_project_template.py
Created July 14, 2023 19:17
Template for Python projects.
#!/usr/bin/env python3
import argparse
import sys
from rich import print
from rich.containers import Lines
from rich.text import Text
from rich_argparse import RichHelpFormatter
function UpscaleCheck(clip c, string "resolution") {
resolution = default(resolution, "720")
eval("""Interleave(c.myffinfo("source", color_lawngreen), c.AutoResize(""" + Chr(34) + resolution + Chr(34) + """).z_Spline36Resize(c.width, c.height).myffinfo("source -> """ + resolution +""" -> source", color_cyan))""")
}
@pcroland
pcroland / mylwlinfo.avsi
Last active September 6, 2021 07:14
Modified lwlinfo for showing only the important parts with white and you can add a bonustext (group name for example) with predefined colors.
red = $FF7C7C
green = $B2FF7C
blue = $8F97FF
yellow = $FFE07C
orange = $FFB97C
magenta = $FF77FF
violet = $C787FF
cyan = $7DF9FF
white = $FFFFFF
azure = $86C8FF
{
"Version": "13.4.0",
"DestinationType": "ImageUploader",
"RequestMethod": "POST",
"RequestURL": "https://kek.sh/api/v1/posts",
"Headers": {
"x-kek-auth": ""
},
"Body": "MultipartFormData",
"FileFormName": "file",
@pcroland
pcroland / Corners.avsi
Last active December 7, 2019 12:11
Corners.avsi
# Corners.avsi, https://forum.doom9.org/showthread.php?p=1819881#post1819881
# Crops all 4 corners of input and outputs stack4 window clip of those corners, allows viewing of corners without scrolling large input clip.
# Giving W=Width(default width/4) and H=Height(default Height/4) of corners. (Default output dim half of input dim, ie 2*Width/4, 2*Height/4).
# (Max W=c.Width, H=c.Height, where output 4 window stack of double dimensions to input).
Function Corners(clip c, Int "W", Int "H") {
c
W = Default(W, 720)
H = Default(H, 360)
W = Default(W,Width/4) H = Default(H,Height/4) # Default corners quarter of dimensions
W=W/4*4 H=H/4*4 # W Mod4 (YV411 compat), H Mod4 (YV12 Interlaced compat)