Skip to content

Instantly share code, notes, and snippets.

View Scoder12's full-sized avatar

Spencer Pogorzelski Scoder12

View GitHub Profile
@Scoder12
Scoder12 / README.md
Last active May 1, 2024 05:19
Firefox query YouTube tabs

How to use

  1. Have devtools.chrome.enabled enabled in your about:config
  2. Press Ctrl + Shift + J to open the browser console
  3. Run snippet.js in the resulting console
  4. The result will be a list of [title, videoId] tuples
  5. You can use this no-dependency, synchronous script to export the result to a CSV Using clipboard to enter it makes the console lag, so you can fetch then eval it:

eval(await (await fetch("https://raw.githubusercontent.com/adaltas/node-csv/master/packages/csv-stringify/dist/iife/sync.js")).text())

@Scoder12
Scoder12 / README.md
Created April 7, 2024 22:00
C interpreter shell script

Shell script to interpret C

I use this script to run C snippets quickly on the commandline, for example to print constants, offsets, or sizes when working in other languages.

If you want to add it to a bin folder, it might be useful to add "$(basename "$0")" "$@" to the bottom and making symbolic links for each function.

@Scoder12
Scoder12 / README.md
Created December 20, 2023 02:55
drawj2d remarkable notebook output

The drawj2d reMarkable notebook output wasn't working for me, so I wrote a script that patches the output to be in the newer format.

Tested on reMarkable version 3.8.3.1976.

Usage:

First, edit drawj2d command in the python file to match your installation.

python3 drawj2d_rm_patcher.py ./hello.txt Hello
@Scoder12
Scoder12 / focus.sh
Created January 4, 2023 05:50
i3-resurrect saver
shouldmatchtitle () {
case "$1" in
discord | VSCodium)
return 0
;;
*)
return 1
;;
esac
@Scoder12
Scoder12 / pwninit.nix
Created May 15, 2022 19:08
pwninit nix
{ pkgs ? import <nixpkgs> { } }:
let
pname = "pwninit";
version = "3.2.0";
in pkgs.rustPlatform.buildRustPackage {
inherit pname version;
src = pkgs.fetchFromGitHub {
owner = "io12";
@Scoder12
Scoder12 / newterm.sh
Last active June 30, 2021 22:31
newterm.sh - easily spawn new gnome-terminals
#!/bin/bash
set -euo pipefail
shopt -s inherit_errexit
detectshell() {
SCRIPT=$(cat <<'EOF'
import os
from shellingham import detect_shell, ShellDetectionFailure
def get_shell():
@Scoder12
Scoder12 / README.md
Last active April 14, 2024 21:37
Valutwarden config for docker-compose

Vaultwarden docker-compose nginx

My setup for vaultwarden. Uses a custom certificate authority to sign certificates. Expects vaultwarden.crt and vaultwarden.pem to be in ./crts.

See https://github.com/ttionya/vaultwarden-backup for instructions on how to configure rclone for backups.

@Scoder12
Scoder12 / neofetch.log
Created June 4, 2021 18:26
Neofetch log
+ verbose=on
+ shift
+ [[ -n --ascii ]]
+ case $1 in
+ image_backend=ascii
+ case $2 in
+ image_source=ascii.txt
+ shift
+ [[ -n ascii.txt ]]
+ case $1 in
@Scoder12
Scoder12 / json2nix.py
Last active March 24, 2024 22:19
Converts JSON objects into nix (hackishly).
"""Converts JSON objects into nix (hackishly)."""
import sys
import json
INDENT = " " * 2
def strip_comments(t):
@Scoder12
Scoder12 / main.go
Created March 31, 2021 21:38
Fuse test
package main
import (
"context"
"flag"
"log"
"syscall"
"github.com/hanwen/go-fuse/v2/fs"
"github.com/hanwen/go-fuse/v2/fuse"