Skip to content

Instantly share code, notes, and snippets.

View yunginnanet's full-sized avatar
👋
looking for work

kayos yunginnanet

👋
looking for work
View GitHub Profile
@yunginnanet
yunginnanet / reolink_ssh_ffmpeg.sh
Created April 10, 2025 01:58
for reolink camera data extracted from SD card, pipe mp4s from sd card in order to remote host over ssh that runs ffmpeg to concatenate and encode them with nvidia cuda (nvenc)
@yunginnanet
yunginnanet / civitai.sh
Last active April 4, 2025 02:58
download civitai model from direct dl link
#!/bin/bash
# - - - - -
webui="/media/3crip/ML/stable-diffusion-webui/models"
comfy="/media/kayos/crucial/crip/Workshop/ComfyUI/models"
# - - - - -
set -e
@yunginnanet
yunginnanet / ftdi_ads1256.py
Created February 19, 2025 08:30
(wip) ftdi + ads1256
import time
from enum import Enum
from pyftdi.spi import SpiController, SpiPort
from pyftdi.usbtools import UsbTools
from pyftdi.ftdi import Ftdi
status_register = 0x00
status_payload = 0x07
@yunginnanet
yunginnanet / burst.py
Created February 3, 2025 01:07
yardstick one slumpin
#!/usr/bin/python3
# pylint: disable=W0614
import sys
import os
import subprocess
import time
import signal
import random
@yunginnanet
yunginnanet / transcribe.sh
Last active March 11, 2025 05:54
bash script for using whisper.cpp to transcribe mp4 files and then count word occurrences in the transcriptions and store in an sqlite database
#!/usr/bin/env bash
_model="/usr/local/share/whisper.cpp/models/ggml-small.en-q5_1.bin"
_threads=3
declare -f _grep
export _grep
declare -g _csv="/media/unsafe/pr0n/counts.csv"
declare -g _sql="/media/unsafe/pr0n/counts.db"
declare -a -g _merged
@yunginnanet
yunginnanet / router_suricata.sh
Last active January 13, 2025 23:31
script for transferring hot suricata logs from remote host over ssh, gzipping on the wire, and appending unix timestamp to name to avoid duplicates
#!/bin/bash
_router="[email protected]"
_remote_suri_dir="/mnt/sdb/var/log/suricata/"
_local_suri_dir="/media/data/router_logs/"
_date_fmt="+%m-%d-%YT%H:%M:%S%Z"
xferlog="${_local_suri_dir}xferlogs/log_fetch_$(date +%s).log"
export xferlog
@yunginnanet
yunginnanet / sshfs.tcl
Last active January 10, 2025 14:43
(expect script) mounts a list of sshfs targets, compensates for lack of ssh-agent for batch unlocking of the configured ssh key
#!/usr/bin/expect -f
# mounts a list of sshfs targets
# compensates for lack of ssh-agent for batch unlocking of the configured ssh key
# ----- Config -------------
set src "kayos@fhjones"
set pairs {
@yunginnanet
yunginnanet / shifd.go
Last active January 10, 2025 14:43
take numbered files, sort them, assure equal length, rename (made for ffmpeg frames)
package main
import (
"errors"
"fmt"
"os"
"slices"
"strconv"
"strings"
)
@yunginnanet
yunginnanet / yeet.janet
Created October 26, 2024 00:23
janet helloworld type beat
(defn yeet
[input]
(if (= input "yeet")
(print "yeet!")
(print "be gone, " input "!")
)
)
(defn main
@yunginnanet
yunginnanet / iwreset.sh
Created September 10, 2024 04:40
reset wireless interface for packet injection purposes to reset queues
#!/bin/bash
_target="$1"
if ! ip link show dev "$_target" >> /dev/null; then
echo "device $_target does not exist"; exit 1
fi
echo "resetting $_target"