Skip to content

Instantly share code, notes, and snippets.

View clort81's full-sized avatar

Clort clort81

View GitHub Profile
@clort81
clort81 / togif.sh
Created July 26, 2026 07:05
ffmpeg to gif animation but better than stackoverflow - better color selection / pallete gen
#!/usr/bin/env bash
# Usage: ./mkv2gif.sh input.mkv output.gif [start] [end] [fps] [width]
# Example: ./mkv2gif.sh delme.mkv delout.gif 00:00:22.5 00:01:12 12 640
#
#
# Option Purpose
# stats_mode=full
# Scans every frame to build one histogram → true global palette. Use diff instead if the background is mostly static (screen recordings) — it only considers pixels that changed, which is usually better for screencasts.
# max_colors=256
# Fills all 256 slots (default).
@clort81
clort81 / cfunc.sh
Created July 26, 2026 07:03
Return the full C function matching a searchkeyword.
#!/usr/bin/env bash
# Show the full c-fuction matching a keyword name
#
# Usage check
if [[ -z "$1" || -z "$2" ]]; then
echo "Usage: $0 <function_name> <file.c>"
exit 1
fi
@clort81
clort81 / smart-hue-dark-mode.user.js
Created January 22, 2026 21:09
Dark Background and Light Text Userscript for Min Browser
// ==UserScript==
// @name Smart HSL Dark Mode
// @namespace http://tampermonkey.net/
// @version 4.2
// @description Attempts hue-preserving intensity inversion with reasonable priorities
// @author clort81 + z.AI
// @match *://*/*
// @grant none
// @run-at document-start
// ==/UserScript==
@clort81
clort81 / clortrain.pl
Last active November 8, 2021 08:48
ANSI Abstrace Terminal Art Perl Animation
#! /usr/bin/env perl
use strict;
use warnings;
use utf8;
use feature qw(say);
use experimental qw(signatures);
use List::Util qw(max any);
use Term::ReadKey qw(GetTerminalSize);
use Time::HiRes qw(sleep);
*STDOUT->binmode(':encoding(UTF-8)');
@clort81
clort81 / bashbeep.sh
Last active November 8, 2021 07:11
Bash Scripting Sound Audio Beep pcspkr
#!/bin/bash
# 255 mysmps SIMPLE SAWTOOTH SOUND
# <-----------------------> \/\/\/\/\/\/\/\/\/\/\
# . . A beep for bash shell
# | mypeak | for machines without
# \ | /\ pc speaker beep \007.
# \ | / \
# \ | / \ It requires alsa and
# \ | / \ 'play' via alsautils.
# \ | / \