Skip to content

Instantly share code, notes, and snippets.

// Using performance.now()
const performanceTimerStart = performance.now();
let performanceTimerElapsed;
// Set the duration for the test (10 seconds)
const testDuration = 10000; // 10 seconds in milliseconds
// Using setTimeout and clearInterval
let setTimeoutTimerStart;
let setTimeoutTimerElapsed;
@rickklaasboer
rickklaasboer / how-to-setup-plex-with-sonarr-radarr-jackett-overseerr-and-qbittorrent-using-docker.md
Last active April 28, 2024 12:32
How to setup Plex with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent using Docker

How to setup Plex with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent using Docker

This is a guide that will show you how to setup Plex Media Server with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent with Docker. It is written for Ubuntu 20.04 but should work on other Linux distributions as well (considering supported distributions by Docker). It is also written for people who have some experience with Linux and Docker. If you are new to Docker, I recommend you to read the Docker documentation, and if you are new to Linux, I recommend you to read the Ubuntu documentation.

Now, let's get started!

Please note: This guide was written without considering hardlinking for Sonarr/Radarr. If you want to use hardlinking refer to #Hardlinking

Prerequisites

@uwezi
uwezi / 20240309_opencv.py
Last active April 28, 2024 12:31
[video inclusion in Manim] Include video objects picture-in-picture. #manim #animate #video #opencv #videomobject
import cv2
from PIL import Image, ImageOps
from dataclasses import dataclass
@dataclass
class VideoStatus:
time: float = 0
videoObject: cv2.VideoCapture = None
def __deepcopy__(self, memo):
return self
@AFAgarap
AFAgarap / autoencoder-pytorch.ipynb
Last active April 28, 2024 12:30
PyTorch implementation of an autoencoder.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 28, 2024 12:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@dadodasyra
dadodasyra / PM5_World_converter.php
Created November 5, 2023 19:24
Convert world with plugin code to leveldb (can be used with sort of a TestCommand) it freezes the server until the end of the conversion and automatically detect the base format.
<?php
$originalPath = "/root/servers/miscs/converting/lobby";
$backupPath = "/root/servers/miscs/converting/backup"; //this will create a folder under this one with the name of the world
$providerManager = new WorldProviderManager();
$writableFormats = array_filter($providerManager->getAvailableProviders(), fn(WorldProviderManagerEntry $class) => $class instanceof WritableWorldProviderManagerEntry);
$requiredOpts = [
"world" => "path to the input world for conversion",
"backup" => "path to back up the original files",
@noghartt
noghartt / cc.md
Last active April 28, 2024 12:26
Resources to learn more about Computer Science and related stuffs
module SystemF where
open import Agda.Primitive
open import Prelude
open import Data.List
weaken-∈ : {a : Set} (Γ₁ : List a) {Γ x y} x ∈ (Γ₁ ++ Γ) x ∈ (Γ₁ ++ y ∷ Γ)
weaken-∈ [] (zero refl) = suc (zero refl)
weaken-∈ [] (suc i) = suc (suc i)
weaken-∈ (x ∷ Γ₁) (zero p) = zero p
@alexishida
alexishida / nginx-config-auth-cert-ssl.md
Last active April 28, 2024 12:23
Tutorial to configure Nginx client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Original: https://gist.github.com/mtigas/952344

Convert SSL certificate from CRT format to PEM

openssl x509 -in server.crt -out server.der -outform DER
openssl x509 -in server.der -inform DER -out server.pem -outform PEM
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 12:22
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory