Skip to content

Instantly share code, notes, and snippets.

@bogsen
bogsen / fix-plex-hdr-subtitles.md
Last active April 19, 2024 01:19
Fix Plex transcoding HDR videos very slowly when burning subtitles in at the same time

What?

For some reason, although Plex supports hardware-accelerated HDR tone mapping, Plex decides not to use it when subtitles need to be burned in. This results in extremely slow transcoding on hardware that should be able to keep up using hardware acceleration. I've noticed this issue on my server with Intel QuickSync, and this fix is made specifically for that case.

Before the fix, the SW tone mapping was only able to do 6-7 fps on a i5 7400T for an HDR 4K->1080p transcode. With the fix, that same transcode happens with HW tone mapping, and goes up to 82 fps. Even for HDR 4K->4K, this CPU is able to do 35 fps using QuickSync, thus keeping up with at least one video stream.

@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active April 19, 2024 01:19
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@martijnvermaat
martijnvermaat / ssh-agent-forwarding-screen.md
Created December 21, 2013 15:06
SSH agent forwarding and screen

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.

@bwright85428
bwright85428 / remora-flexi.hal
Last active April 19, 2024 01:18
Milo V1.5 LinuxCNC Config
# load the realtime components
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt flexi chip_type=STM SPI_clk_div=32 PRU_base_freq=120000
loadrt not names=stepen_not,stepen_z_not,probe_basic_time_not
loadrt time names=probe_basic_time_time
loadrt estop_latch names=estop_latch
loadrt and2 names=run_and,step_and
@chaodonghu
chaodonghu / follow-instagram.js
Last active April 19, 2024 01:16
Google Chrome script that allows user to mass follow instagram users on another's profile
// Run GOOGLE CHROME - WORKING AS OF DEC 26 2023
// Please @ me in the comments if this stops working, I will try to get it working again within the month
// INSTRUCTIONS
// 1. Open Instagram in Chrome
// 2. Click on "FOLLOWERS" OR "FOLLOWING" on your Instagram profile or a desired user's Instagram profile
// 3. Open developer tools by right clicking on the page and clicking "INSPECT"
// 4. Copy the code below and paste in the developer tools console and press enter to run
// 5. Script will not run if tab is navigated away from, minimized of unfocused (It is recommended to open a new chrome window or push tab to the side and let script run in background)
@scriptdev
scriptdev / .php
Created February 26, 2024 02:51
DESTACAR LINHA ( COR DE FUNDO ) DATAGRID
<?php
$column_vencimento->setTransformer(function($value, $object, $row)
{
if ($value < date('Y-m-d'))
{
$row->style = 'background:#FC7474';
}
$date = new DateTime($value);
@MihailJP
MihailJP / scala.xml
Last active April 19, 2024 01:14
Notepad++ syntax highlighting definition file for Scala
<NotepadPlus>
<UserLang name="Scala" ext="scala" udlVersion="2.0">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" forceLineCommentsAtBOL="no" foldCompact="no" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="yes" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments" id="0">00// 01 02 03/* 04*/</Keywords>
<Keywords name="Numbers, additional" id="1"></Keywords>
<Keywords name="Numbers, prefixes" id="2">0x</Keywords>
@willianfalbo
willianfalbo / README.md
Last active April 19, 2024 01:13
Install Zsh, Oh-My-Zsh, Fonts-Powerline & Plugins (Ubuntu 18.04+)

Install Zsh, Oh-My-Zsh, Fonts-Powerline & Plugins (Ubuntu 18.04+, MacOS)

Introduction

After following these steps, your terminal will look like:

1. Install Zsh

Zsh is a shell designed for interactive use, although it is also a powerful scripting language.

@samselikoff
samselikoff / chart-with-d3.jsx
Last active April 19, 2024 01:11
Diff from "Building an Animated Line Chart with d3, React and Framer Motion" https://www.youtube.com/watch?v=kPbRDn5Fg0Y
import * as d3 from "d3";
import {
eachMonthOfInterval,
endOfMonth,
format,
isSameMonth,
parseISO,
startOfMonth,
} from "date-fns";
import useMeasure from "react-use-measure";