Skip to content

Instantly share code, notes, and snippets.

import os
import subprocess
import shutil
from os import startfile
import codecs
# Check if FLAC.exe exists in PATH
if not shutil.which('flac') is not None:
print('\nSeems like FLAC.exe is missing...')
print('Please download FLAC from: https://xiph.org/flac/download.html')
@ScribbleGhost
ScribbleGhost / gist:00ce8f3c73f0ad3a7ac9b0578b375def
Created August 4, 2022 07:42
Remove the track title (track name) from an audio track in an MKV file
for /r %i in (*.mkv) do (mkvpropedit "%i" --edit track:a1 --set "name=")

hi, and goodbye

The past few weeks has not been fun on IRC, the drama based on false information and assumptions has been insane. I've almost entirely been silent on the drama because I know the fallout that would happen if I spoke up.

A quick TLDR - I'm quitting all IRC development. KiwiIRC project lead, IRCv3 technical board, supporting the multitude of IRC networks, the lot.

Many people seem to think that I am supporting one side in everything that is going on, so just to be clear: I am not supporting any side of the current freenode drama - there is so much false information going around from everywhere that it is impossible to support anybody.

Woo freenode drama

Some handy MKVToolNix commands

Extract chapter XML files for all MKVs:

for /r %i in (*.mkv) do (mkvextract "%i" chapters "%~ni".xml)

Remove all chapters from MKVs:

for /r %i in (*.mkv) do (mkvpropedit "%i" --chapters "")
@ScribbleGhost
ScribbleGhost / subtitle_extractor.bat
Last active January 26, 2023 03:24
Extract all subtitles from MKV video file, and make a copy of the video file without subtitles. Requires mkvmerge and subtitleedit CLI in PATH
@echo off
FOR %%A IN (*.mkv) DO (
echo %%~nxA
FOR /F %%I IN ('mkvmerge -i "%%A" ^| FIND /C "SubRip"') DO (IF %%I GTR 0 (echo SRT found in file) & (subtitleedit /convert "%%A" SubRip) else (echo SRT not found in file))
echo.&echo.
FOR /F %%I IN ('mkvmerge -i "%%A" ^| FIND /C "SubStationAlpha"') DO (IF %%I GTR 0 (echo ASS found in file) & (subtitleedit /convert "%%A" SubStationAlpha) else (echo ASS not found in file))
echo.&echo.
FOR /F %%I IN ('mkvmerge -i "%%A" ^| FIND /C "VobSub"') DO (IF %%I GTR 0 (echo. &echo. &echo. &echo. & echo VobSub - SUB/IDX found in file. You should use SubtitleEdit to convert the subtitles to a text-based format such as SRT) else (echo VobSub not found in file))
echo.&echo.
@ScribbleGhost
ScribbleGhost / Check a video file for subtitles, subtitle language and subtitle format
Created April 12, 2021 12:47
Check a video file for subtitles, subtitle language and subtitle format with ffprobe
ffprobe -loglevel error -select_streams s -show_entries stream=codec_name,index:stream_tags=language -of csv=p=0 %input%

Plex file hierarchy example

📂 ROOT
	┣📂 MOVIES
	┃ ┣ 📂 The Shawshank Redemption (1994)
	┃ ┃ ┣ 🎬 The Shawshank Redemption (1994).mkv
@idelem
idelem / titleUrlMarkdownClip.js
Last active March 12, 2024 02:01 — forked from bradleybossard/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
@lrvick
lrvick / github-troll.md
Last active May 3, 2024 16:20
Trolling Github's DMCA repo with their own security flaws.
@ScribbleGhost
ScribbleGhost / Privacy links you might want to check out.md
Last active February 4, 2024 13:16
👀 Privacy links you might want to check out...