This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
readcountdown1 () { | |
if [[ "$#" -lt 3 ]]; then | |
cat <<-EOT | |
Accepts a single char of user input | |
Usage: readcountdown1 seconds variable message | |
Ex: readcountdown1 5 inp '(d)elete (anything else exits)' | |
gives 5 seconds and sets inp if anything (even enter) entered | |
returns 0 on success, 1 for timeout | |
EOT | |
return 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# gist-paste -u https://gist.github.com/jaggzh/f687be9a23d267e641dc7ff7a1967b9a spect | |
# Dependencies: | |
# ffmpeg (we extract audiosecs=60 for the spectrogram) | |
# sox (for spectrogram image creation) | |
# chafa (for conversion of spectrogram to text) | |
tmpdel_s=$((60)) # 5 minutes | |
def_maxh=5 | |
def_maxh_1=16 # Height for 1 file | |
def_maxh_2=10 # Height for each of 2 files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Copyleft 2024 jaggz.h {over yonder at} gmail.com | |
# jaggzh @ reddit | |
# Usage: | |
# python plotter.py -i defocus.ods -o defocus.png | |
# Gist url for this script: | |
# https://gist.github.com/jaggzh/f4aea3e8c09363bf4924b8bd2f80895d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Source at: https://gist.github.com/jaggzh/4f4159b1b137cbc9553efb7d8364f0c9 | |
. ansi.sh # ansi.sh from: https://gist.github.com/jaggzh/6b3746475bbde5a077dfaeae793b7d1f | |
bgblu=$'\e[44m' | |
bmag=$'\e[35m' | |
whi=$'\e[37m' | |
rst=$'\e[0m' | |
# blank to disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# gist-paste -u https://gist.github.com/jaggzh/47b1c58617601b5aaab9da6233aaeae1 mapper-linear | |
import json | |
import datetime | |
import folium | |
from folium.plugins import TimestampedGeoJson | |
# Load the fire perimeter data | |
with open("query-to-2025-01-09_23-14pm.json") as F: | |
data = json.load(F) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# embed-search | |
# Takes query text (utext) on the commandline, | |
# and many lines of text from stdin or a file (lines). | |
# Outputs the highest semantically-matching line(s) | |
# gist-paste -u https://gist.github.com/jaggzh/d57ef8757c10e945d99c77f91449e33a embed-search-wrapped | |
# Dependencies: |
OlderNewer