Skip to content

Instantly share code, notes, and snippets.

@neckro
neckro / convert-sub.py
Created February 9, 2024 15:46
convert faster-whisper subs to an actually usable format
#!/usr/bin/env python3
import fileinput
import re
from math import floor
def main():
r = re.compile("(\\d+\\.\\d+) --> (\\d+\\.\\d+)")
for line in fileinput.input():
m = r.match(line)
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco feature enable -n allowGlobalConfirmation
choco feature enable -n useRememberedArgumentsForUpgrades
# cli: media utils
choco install ffmpeg flac lame
# cli: archivers
choco install bzip2 gzip 7zip.commandline unrar
# cli: unix stuff
flowchart TD;

subgraph Audio
  subgraph Voicemeeter
    VMA(Voicemeeter Aux In)
    VMASIO(Voicemeeter ASIO Out)
  end
  ASIO(ASIO4ALL)
 subgraph REAPER

People are asking how I bootleg the FORGOTTEN_VCR Twitch stream to VHS so here is how I do it:

  • Get a hardware thingy that lets you convert HDMI to composite video to connect to your VCR. I personally use a zombie-RCA-branded adapter, model DHCOMF. I paid way too much for mine ($55 at Micro Center) but you can probably find it cheaper elsewhere. There are tons of other cheap Chinese ones out there but what I like about this particular one is that it doesn't require external power, you just plug in HDMI and go. It's also more portable than the others, and seems somewhat better quality.

  • These adapters usually have two video resolutions available: 640x480 and 720x480. Technical note here: 720x480 is the "standard" digital resolution for an NTSC video signal. But here's the tricky part! If you do the math, you'll notice that 720x480 is a 3:2 aspect ratio, while a TV screen is 4:3 aspect ratio. This means that the pixels in the video image are not square! On the RCA adapter at least, there is *no a

<?php
error_reporting(-1);
$file = realpath(@$_GET['f']);
$p = pathinfo($file);
if (!$file || strtolower(@$p['extension']) !== 'md') {
http_response_code(403);
exit;
}
$cmd = sprintf(
'./peg-multimarkdown/multimarkdown %s --smart',

Keybase proof

I hereby claim:

  • I am neckro on github.
  • I am neckro (https://keybase.io/neckro) on keybase.
  • I have a public key ASCWRmKZ-yO7R0Fc1BYzhzLnjxg_bVAmcaO57C4KLBJ4FQo

To claim this, I am signing this object:

#!/usr/bin/env node
'use strict'
const path = require('path')
const replace = require('replace')
const semver = require('semver')
const Git = require('nodegit')
const buildCompiler = require('./build-prod.js')
const buildConfig = require('./build-config')
@neckro
neckro / reclaimWindows10.ps1
Last active November 7, 2016 22:00 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Forked from http://pastebin.com/gQxCUkLP
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Original Version: 1.4, 2016-01-16
# Tweaked based on personal preferences for @alirobe 2016-03-23 - v1.4.1
# NOTE: MAKE SURE YOU READ THIS SCRIPT CAREFULLY BEFORE RUNNING IT + ADJUST COMMENTING AS APPROPRIATE
# This script will reboot your machine when completed.
##########
# Ask for elevated permissions if required
@neckro
neckro / 0_reuse_code.js
Created August 9, 2016 21:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/* Runs Conway's Life cellular automata simulation on an 8x8 LED matrix.
6 January 2012 - neckro@gmail.com - No license. Do what thou wilt.
Requires a Maxim MAX7221 or MAX7219 LED controller IC.
Also requires LedControl library: http://www.arduino.cc/playground/Main/LedControl
*/
#include <LedControl.h>
// Number of ms to wait between frames
#define DELAY 45