Skip to content

Instantly share code, notes, and snippets.

View MythodeaLoL's full-sized avatar

Castle MythodeaLoL

  • Developing Ideas
  • Brazil
View GitHub Profile
@souhaiebtar
souhaiebtar / reset_beyond_compare.md
Last active September 28, 2022 03:59
[reset beyond compare] reset beyond compare #bcompare #beyond_compare #windows

On windows[1][1]

  1. remove items from HKEY_CURRENT_USER\Software\Scooter Software\Beyond Compare 4\CacheId registry

N.B:

those not working:

    Delete C:\Users\[user]\AppData\Roaming\Scooter Software\Beyond Compare 4 directory, invalid
 Deleting the file C:\Program Files\Beyond Compare 4\BCUnrar.dll did not work
@brimur
brimur / preCachePlexEpisode.py
Last active April 3, 2024 05:31
Python script to cache the next episode of a TV show playing in Plex using rclone
#######################################
# This python script should be run
# as a cron job every 15 minutes to
# cache the next episode of a currently
# playing TV show.
########################################
import requests
import os
import psutil
@jamesmacwhite
jamesmacwhite / README.md
Last active September 19, 2022 20:30 — forked from hazcod/apache-plex-reverse-proxy.vhost
Apache 2.4 reverse proxy VirtualHost configuration for Plex. Requires modules ssl, proxy, wstunnel

I no longer use Apache as a reverse proxy and moved to NGINX. No further updates will be made to this configuration. It may or may not work in the future, no warranty or support will be provided.

Apache 2.4 reverse proxy configuration for Plex Media Server

This VirtualHost configuration has been tested with the minimum requirements of Plex Media Server Version 1.16.5.1488 and Web Version: 3.108.2.

The TLS configuration only allows clients that support TLS 1.2+, this may cause issues for legacy clients. You may need to adjust this if specific clients have issues connecting. If however you are OK with having just TLS 1.2+ support, you can also enable the "Disable weak TLS versions" setting on your Plex server, given the reverse proxy will prevent a successful TLS negotiation for such clients anyway.

Requirements

@fador
fador / ffmpeg_libav_video_demux_decode_example.cpp
Created January 24, 2019 09:20
ffmpeg / libav demuxing and decoding example using the new API
#include <cstdlib>
#include <cstdio>
#include <cstring>
#ifdef HAVE_AV_CONFIG_H
#undef HAVE_AV_CONFIG_H
#endif
extern "C" {
#include "libavcodec/avcodec.h"
@vdbelt
vdbelt / cloudflare-ignore-query-string.js
Created October 3, 2018 08:31
Ignore query string for optimal caching
addEventListener('fetch', event => {
event.respondWith(ignoreQueryString(event.request))
})
async function ignoreQueryString(request) {
let url = new URL(request.url)
url.search = ''
let modifiedRequest = new Request(url, request)
@heywoodlh
heywoodlh / reset-terminal-services.ps1
Created September 1, 2017 14:49
Script for renewing RDP License
## This Script is intended to be used for Querying remaining time and resetting Terminal Server (RDS) Grace Licensing Period to Default 120 Days.
## Developed by Prakash Kumar (prakash82x@gmail.com) May 28th 2016
## www.adminthing.blogspot.com
## Disclaimer: Please test this script in your test environment before executing on any production server.
## Author will not be responsible for any misuse/damage caused by using it.
Clear-Host
$ErrorActionPreference = "SilentlyContinue"
## Display current Status of remaining days from Grace period.
@0xallie
0xallie / lossless-stream-rip-cheatsheet.md
Last active April 27, 2024 04:41
Lossless stream rip cheatsheet

Lossless stream rip cheatsheet

Note: This guide may be slightly outdated. It may be still useful for older releases, but nowadays the vast majority of releases are correctly tagged as WEB-DL (unless it's RARBG/rartv). Protip: prefer looking at file names instead of release names, as they tend to be more accurate.

This is a short cheatsheet to help you determine whether a release from Amazon, Hulu, or Netflix contains the lossless/untouched (as in no further loss of quality compared to what the streaming services provide) video/audio or not. Most newer P2P releases are correctly tagged, but for older releases, it cannot be reliably determined based on the tags alone.

In most cases, non-lossless rips from these services are screen captures (which, when done by professional releasers, should be high quality and contain little to no glitches – see the history section for details), but in some cases they may be simply reencoded from the untouched stream, for example to crop black bars or reencode from a

<?php
header("Connection: close"); // not sure we need this one
header("Content-Encoding: none");
include ("config.php");
use Carbon\Carbon;
ignore_user_abort( true );
set_time_limit(0);
register_shutdown_function('shutdown');
@gtgt
gtgt / 00-ffmpeg_random_segment_format.patch
Last active April 2, 2023 10:05
ffmpeg - random filename segment patch (this way you only need to protect the playlist, not the segments)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 17ae300..7ff8c22 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3809,6 +3809,36 @@ uint64_t ff_ntp_time(void)
return (av_gettime() / 1000) * 1000 + NTP_OFFSET_US;
}
+static char *randstring(size_t length) {
+ static char charset[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
@MaximAlien
MaximAlien / ClassName
Created April 22, 2015 09:19
[Android] [JNI] Method to get class name as std::string
static std::string getClassName(JNIEnv *env, jobject entity, jclass clazz)
{
jmethodID mid = env->GetMethodID(clazz, "getClass", "()Ljava/lang/Class;");
jobject clsObj = env->CallObjectMethod(entity, mid);
jclass clazzz = env->GetObjectClass(clsObj);
mid = env->GetMethodID(clazzz, "getName", "()Ljava/lang/String;");
jstring strObj = (jstring)env->CallObjectMethod(clsObj, mid);
const char* str = env->GetStringUTFChars(strObj, NULL);
std::string res(str);