Skip to content

Instantly share code, notes, and snippets.

View arabcoders's full-sized avatar

Abdulmohsen arabcoders

View GitHub Profile
@arabcoders
arabcoders / widevine-decryption.md
Created April 12, 2025 16:18 — forked from frozenpandaman/widevine-decryption.md
download videos protected with widevine DRM
@arabcoders
arabcoders / README.md
Last active March 23, 2025 17:32
Alternative implementation for Tver extractor for yt-dlp, this extractor works as plugin

This is my alternative implementation for Tver extractor.

Sadly the PR kindof staled and waiting on base streaks.jp extractor. so the main class in my PR will have to adapt to the new baseclase, which will no longer make sideloading this possible, as such i have made this seperate implementation with more features that i personally use.

To use it simply follow the guide

https://github.com/yt-dlp/yt-dlp#plugins

@arabcoders
arabcoders / renamer.py
Last active February 26, 2024 15:17
A Python script to rename files with history support.
#!/usr/bin/env python3
# -*- encoding: UTF8 -*-
#
# Copyright (c) 2024 ArabCoders
# Licensed under the MIT License
#
from argparse import RawDescriptionHelpFormatter
import logging
import sqlite3
@arabcoders
arabcoders / bistorian.py
Created January 25, 2024 11:44
A python script to save your bash history to sqlite db and allow you to export it back.
#!/usr/bin/env python
# -*- encoding: UTF8 -*-
import logging
import sqlite3
import os
import sys
class Bistorian:
@arabcoders
arabcoders / CurlRanger.php
Last active December 26, 2023 17:38
Wrapper around curl to accelerate download speed using range requests for downloading.
<?php
use Closure;
use CurlHandle;
use InvalidArgumentException;
use Random\RandomException;
use RuntimeException;
final class CurlRanger
{
@arabcoders
arabcoders / Tdarr_Plugin_AC_HEVC_GPU.js
Last active July 24, 2024 22:18
tdarr boosh qsv plugin without the mkvpropedit and ffmpeg stats call. if you use cloud backend, or have slow drive pool, this is a MUST as the original plugin would cause massive writes for things which aren't really needed. as it was used in the nvidia plugin
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
const details = () => ({
id: 'Tdarr_Plugin_AC_HEVC_GPU',
Stage: 'Pre-processing',
Name: 'Transcode a video file',
Type: 'Video',
Operation: 'Transcode',
Description: 'Transcode a video file using ffmpeg. GPU transcoding will be used if possible.',
Version: '1.42',
Tags: 'pre-processing,ffmpeg,video only,nvenc h265,configurable',
@arabcoders
arabcoders / FIX_PLEX.md
Created January 13, 2023 22:10
Fix Plex localmedia Legacy agent

Plex Legacy Localmedia agent.

There is a a bug in Plex old localmedia agent for python based agents, it will not search for any subtitles if the season folder is year based, for more information please take look at this plex bug report.

To fix the issue at least for linuxserver/plex containers. do the following, this has to happen everytime the container restarts as plex somehow redownload everytime the container restarts.

first gain shell access to your docker container by doing docker exec -ti container_name bash change container_name to whatever you named your container to be. Then execute the following commands.

$ sed -i 's/int(s) &lt; 1900/int(s) &lt; 3000/g' /usr/lib/plexmediaserver/Resources/Plug-ins-*/LocalMedia.bundle/Contents/Code/__init__.py
@arabcoders
arabcoders / (3.2.1 [0542c25]) sabnzbd newswrapper.patch
Last active April 26, 2021 22:15
Patch sabnzbd to use same hostip for downloads/outgoing connections., do note that the WebUI will still report host default IP connection. this only affect the outgoing NNTP connections., also this may not work well on IPv6 NTP servers, i only tested it on ipv4 servers. taken from https://forums.sabnzbd.org/viewtopic.php?p=96582#p96582 please re…
--- newswrapper.py 2021-02-28 23:35:56.627867710 +0300
+++ newswrapper.py.ori 2021-02-28 23:50:04.462036861 +0300
@@ -305,6 +305,14 @@
# Use a regular wrapper, no certificate validation
self.sock = ssl.wrap_socket(socket.socket(af, socktype, proto))
+ #bind outgoing to same interface.
+ try:
+ self.sock.bind((sabnzbd.cfg.cherryhost(), 0))
+ logging.info('bind to %s worked OK', sabnzbd.cfg.cherryhost() )
@arabcoders
arabcoders / blur_detector
Created May 31, 2020 03:47 — forked from pceres/blur_detector
blurry photos detection
#! /bin/bash
#
# Author: Pasquale Ceres ([email protected])
# License: GPL ver. 3
#
# Script originally developed for the
# "San Lorenzo Martire Caposele Church Records Digitalization Project"
#
# http://www.facebook.com/group.php?gid=188973755117&v=photos
@arabcoders
arabcoders / tar.gz with gpg-encryption on the fly
Created June 10, 2017 19:01 — forked from revnode/tar.gz with gpg-encryption on the fly
Create a encrypted tar.gz file from a directory on the fly. The encryption is done by GPG with a public key. The resulting filename is tagged with the date of creation. Very usefull for encrypted snapshots of folders.
tar -cvz /<path>/ | gpg --encrypt --recipient <keyID> > /<backup-path>/backup_`date +%d_%m_%Y`.tar.gz.gpg