Skip to content

Instantly share code, notes, and snippets.

View carcigenicate's full-sized avatar

Brendon Williams carcigenicate

View GitHub Profile
// ==UserScript==
// @name Reply Saver
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Saves unposted top-level replies to localStorage, and restores them on nav back to the page.
// @author carcigenicate
// @match https://old.reddit.com/r/*/comments/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
const obsArr = [
'.',
'-',
'replaceAll',
'ip',
':',
'hostname',
'location',
'',
'unk.com',
// ==UserScript==
// @name Seed Counter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Counts seeds
// @author carcigenicate
// @match https://www.zeldadungeon.net/breath-of-the-wild-interactive-map?*
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant none
// ==/UserScript==
@carcigenicate
carcigenicate / changer.js
Created February 26, 2023 23:06
YouTube Subtitle Language Changer
// ==UserScript==
// @name Subtitle Language Changer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Spawns a small textbox and button to easily allow changing YouTube's subtitle language.
// @author You
// @match https://www.youtube.com/watch*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
from unittest import TestCase
from my_dataclass import MyDataclass
class BasicTestCaseBase(TestCase):
def setUp(self):
class TestClass(MyDataclass):
a: int
b: int
using namespace System.Net.Sockets
$Encoder = [System.Text.Encoding]::UTF8
$SIZE_BUFFER_SIZE = 4
$PROMPT = ">>> "
function Read-NBytes {
Param($Stream, $NToRead)
using namespace System.Net.Sockets
$Encoder = [System.Text.Encoding]::UTF8
$REMOTE_HOST = "127.0.0.1"
$REMOTE_PORT = 1234
$N_CONNECT_RETIRES = 5
$SIZE_BUFFER_SIZE = 4
class BadIterable:
def __iter__(self):
class Iterator:
def __init__(self):
self.n = 0
def __next__(self):
return self.n
def __iter__(self):
return self
def advance(self, by):
import subprocess as sp


class InterfaceController:
    def __init__(self, interface_name):
        self.name = interface_name

    def _checked_iwconfig(self, *commands) -> None:
        completed = sp.run(["iwconfig", self.name, *commands], capture_output=True)

if completed.returncode != 0: