Skip to content

Instantly share code, notes, and snippets.

@velzie
velzie / manifest-v2-chrome.md
Last active November 11, 2024 17:49
How to keep using adblockers on chrome and chromium

How to keep using adblockers on chrome and chromium

  1. google's manifest v3 has no analouge to the webRequestBlocking API, which is neccesary for (effective) adblockers to work
  2. starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions alltogether
  3. this will inevitably piss of enterprises when their extensions don't work, so the ExtensionManifestV2Availability key was added and will presumably stay forever after enterprises complain enough

You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working

Linux

In a terminal, run:

@mia-riezebos
mia-riezebos / OBOT.sh
Last active March 16, 2024 12:03
My Obsessively Balanced & Optimized Transcode script, using FFMPEG.
# [O]bsessively [B]alanced & [O]ptimized [T]ranscode script
ffmpeg -i <input> \ # select input video file
-vsync 0 # prevent FFmpeg from creating output YUV with duplicate and extra frames.
-hwaccel cuda # enable hardware acceleration using cuda
-hwaccel_output_format cuda # unclear- read https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/ffmpeg-with-nvidia-gpu/index.html
-c:v hevc_nvenc -preset p7 -tune hq \ # NVENC HEVC encoder, preset p7 (slowed, best quality), tune for high quality
-cq:v 23 \ # constant quality (CRF equivalent) of 23 (decent quality, great compression)
-rc:v vbr \ # use Variable Bit Rate (VBR) for rate control mode
-rc-lookahead:v 4 \ # look 4 frames ahead for VBR compression optimization
mail.yandex.ru##.ns-view-left-box>:nth-of-type(2)
mail.yandex.ru##.mail-Layout-Content>:nth-of-type(2)
market.yandex.ru##[data-apiary-widget-name="@marketfront/HeaderPromo"]
market.yandex.ru##[data-apiary-widget-name="@marketfront/HeroBannerCarousel"]
market.yandex.ru##[data-apiary-widget-name="@marketfront/MadvHeaderPromo"]
youtube.com##[is-shorts]
docs.nestjs.com##div.banner
habr.com##.tm-stories-block
market.yandex.ru##[data-auto="banner"]
@m-radzikowski
m-radzikowski / script-template.sh
Last active November 15, 2024 11:25
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@sharunkumar
sharunkumar / adb-dns.bat
Created February 7, 2020 07:08
Enabling / Disabling private DNS in android via ADB
rem to disable private dns
adb shell settings put global private_dns_mode off
rem to enable private dns with hostname (example with dns.adguard.com)
adb shell settings put global private_dns_mode hostname
adb shell settings put global private_dns_specifier dns.adguard.com
@anmoljagetia
anmoljagetia / appify
Created August 7, 2017 12:33
Appify script to create MacOS apps from scripts.
#!/usr/bin/env bash
Appify="$(basename "$0")"
if [ ! "$1" -o "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF
Appify v5 for Mac OS X
Creates the simplest possible Mac OS X app from a shell script.
Takes a shell script as its first argument:
@plorechax
plorechax / README.md
Created November 4, 2016 13:52
Shazam Lite app patch

Shazam Lite app patch

This is a patch for Shazam Lite app.

Features

  • Disables region restriction.
    The app sends "in" (India) country code to the Shazam servers. The code for this feature was taken from a modification by blunden. All credits should go to him.
  • Disables beacon requests.