Skip to content

Instantly share code, notes, and snippets.

@mrange
mrange / 0_README.md
Last active May 26, 2023 03:58
Happy little terminal shader

Install shader

  1. Save happy.hlsl to disk, note the path for later.
  2. Open Windows terminal settings
  3. Open settings as JSON
  4. Add a custom shader to the default profile, see excerpt below.
{
 "profiles": {
@geerlingguy
geerlingguy / cache-purge.yml
Last active November 30, 2022 19:26
Cache purge script to clear Nginx + Cloudflare cache for a given set of URLs.
---
- hosts: webserver
become: true
gather_facts: false
vars:
# API token should be created with cache_purge permissions.
cloudflare_purge_zone: [zone id from cloudflare]
cloudflare_purge_token: "{{ lookup('env','CLOUDFLARE_PURGE_TOKEN') }}"
cloudflare_purge_body:
@kou1okada
kou1okada / README.md
Last active January 16, 2023 13:04
dump_comp_vars.bash - Dump completion variables for bash

dump_comp_vars.bash - Dump completion variables for bash

Usage

1. Make symbolic link into $BINDIR as:

BINDIR=~/.local/bin/
ln -sv "$PWD/dump_comp_vars.bash" "${BINDIR:-/usr/local/bin/}"
@JenieX
JenieX / crxcagrepper.py
Created September 25, 2022 04:08 — forked from sooshie/crxcagrepper.py
Download multiple versions of Chrome extension source from crxcavator.io and run a string search on the files.
# Python 3
# Sometimes hunting for strings in a bunch of different browser extensions and their many versions can be a pain.
# This will call out to crxcavator.io, pull the versions and sources. Then just run a simple string match on it.
# Surprisingly, it works.
#
# [email protected]
import requests
import json
@yunooooo
yunooooo / lossless-stream-rip-cheatsheet.md
Created September 23, 2022 02:20
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

@yunooooo
yunooooo / _restream_cenc.md
Created September 23, 2022 01:39 — forked from rlaphoenix/_restream_cenc.md
Ways to re-stream and decrypt MPEG-CENC live streams. (or just play on desktop)

Disclaimer

  1. All content keys were redacted, they should be 128-bit hex strings.
  2. These methods involve the use of ffmpeg and -cenc_decryption_key which is not part of stable releases as of July 2022. Use nightlies from gyan.dev or some other autobuild in the meantime. Hopefully it gets added in the next stable release.
  3. On my end none of these were particularly reliable. This may change in the future as FFmpeg evolves. The direct method of playing with ffplay is currently the most reliable out of the listed methods.

xTeVe (for Emby/Plex)

@mrange
mrange / 0_readme.md
Last active May 26, 2023 03:58
Reactor shader inspired by Microsoft Reactor Graphics. For us in windows terminal

Install shader

Note: Doesn't work on latest preview of windows terminal (2022-09-15) but should work on later previews.

  1. Save reactor.hlsl to disk, note the path for later.
  2. Open Windows terminal settings
  3. Open settings as JSON
  4. Add a custom shader to the default profile, see excerpt below.
import os
import pickle
import time
import glob
import joblib
import inspect
from loguru import logger
def persist_to_file():
@mrange
mrange / thindal.hlsl
Created September 11, 2022 10:38
Thindal Windows Terminal
#define WINDOWS_TERMINAL
Texture2D shaderTexture;
SamplerState samplerState;
// --------------------
#if defined(WINDOWS_TERMINAL)
cbuffer PixelShaderSettings {
float Time;
float Scale;
@dev-king21
dev-king21 / coalesce-11-phosphorescence-5.markdown
Created September 10, 2022 12:02
Coalesce 11 - Phosphorescence 5