Skip to content

Instantly share code, notes, and snippets.

View HyperplaneOrg's full-sized avatar
💭
I may be slow to respond.

Andrew Michaelis HyperplaneOrg

💭
I may be slow to respond.
View GitHub Profile
@HyperplaneOrg
HyperplaneOrg / q-signals.csv
Created May 5, 2025 03:20
Q-signals, a radio shorthand code system (from ARRL)
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 3.
QRG, "Your exact frequency (or that of ______) is _________kHz. Will you tell me my exact frequency (or that of __________)?"
QRL, "I am busy (or I am busy with _________). Are you busy? Usually used to see if a frequency is busy."
QRM, "Your transmission is being interfered with _________" (1. Nil; 2. Slightly; 3. Moderately; 4. Severely; 5. Extremely.) Is my transmission being interfered with?"
QRN, "I am troubled by static _________. (1 to 5 as under QRM.) Are you troubled by static?"
QRO, "Increase power. Shall I increase power?"
QRP, "Decrease power. Shall I decrease power?"
QRQ, "Send faster (_________wpm). Shall I send faster?"
QRS, "Send more slowly (_________wpm). Shall I send more slowly?"
QRT, "Stop sending. Shall I stop sending?"
QRU, "I have nothing for you. Have you anything for me?"
@HyperplaneOrg
HyperplaneOrg / connect-node-asterisk.sh
Last active December 21, 2024 03:54
Asterisk Node Connection Wrapper
#!/bin/bash
LOCAL_NODE=<node_number>
REMOTE_NODE=<node_number>
if [ "$1" == "tx" ]; then
echo "asterisk -vv -rx "rpt fun $LOCAL_NODE *3$REMOTE_NODE""
asterisk -vv -rx "rpt fun $LOCAL_NODE *3$REMOTE_NODE"
elif [ "$1" == "rx" ]; then
echo "asterisk -vv -rx "rpt fun $LOCAL_NODE *2$REMOTE_NODE""
@HyperplaneOrg
HyperplaneOrg / zshrc.sh
Created May 5, 2023 00:48
bash or zsh random passwd generator
function passwd_rand() {
LC_ALL=C tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./<=>?@[\]^_`{|}~' < /dev/urandom | head -c 18; echo""
}
@HyperplaneOrg
HyperplaneOrg / run-aide.sh
Created February 22, 2023 17:55
Simple aide with SNS script...
#/bin/bash
export OPS_SNS='arn:aws:sns:us-west-<n>:<acct>:<top-name>'
function init() {
aide --init
mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
}
function check() {
@HyperplaneOrg
HyperplaneOrg / recover_teams.sh
Created August 19, 2021 00:22
MS Teams (junk) constantly crashes on Mac; this script will reopen it as needed. Example Crontab "*/6 * * * * recover_teams.sh"
#!/bin/bash
pgrep "Microsoft Teams Helper" 1> /dev/null
if [ $? -eq 1 ]; then
open /Applications/Microsoft\ Teams.app
fi
@HyperplaneOrg
HyperplaneOrg / mp4_2_gif
Created June 17, 2021 17:39
mpeg4 to gif with palette
#!/bin/bash
RESCALE=720
FPS=8
if [ -z "$1" ]; then
echo "m2gif.sh <mp4>"
exit 1
fi
fin=$1
fgif="${fin%.*}.gif"
echo "ffmpeg -i $fin -vf \"fps=$FPS,scale=$RESCALE:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse\" -loop 0 $fgif"
@HyperplaneOrg
HyperplaneOrg / memflog.c
Created April 12, 2021 23:56
Flog memory across a set of nodes
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <errno.h>
#include <getopt.h>
#include <sys/sysinfo.h>
#include <unistd.h>
#include <mpi.h>
#define DEFAULT_PERCT 80.0
@HyperplaneOrg
HyperplaneOrg / split_evenly.sh
Created February 12, 2021 01:21
Splits a file into an ~equal number of lines
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ]; then
echo "split_evenly.sh <file> <n>"
echo " Splits a file into an ~equal number of lines"
exit 1
fi
num_files=$2
fname=$1
total_lines=$(wc -l <$fname)
((lines_per_file = (total_lines + num_files - 1) / num_files))
@HyperplaneOrg
HyperplaneOrg / rmfillval.py
Created November 25, 2020 15:56
Removes the '_FillValue' attr for a select set of sds's
#!/usr/bin/env python
# Description: Removes the '_FillValue' attr for a select set of sds's
import sys
import logging
from pyhdf.HDF import HDF, HDF4Error, HC
from pyhdf.V import *
#--------------------------------------------------------------------------------
@HyperplaneOrg
HyperplaneOrg / encrypt.sh
Created September 16, 2020 04:49
Encrypt and base64 encode a file
#!/bin/bash
if [ -z "$1" ]; then
echo "encrypt.sh <file> [ bin ]"
echo "If the bin option is given the base64 encoding is not done."
exit 1
fi
FL=$1
if [ -z "$2" ]; then
openssl enc -aes-256-ctr -salt -in $FL | base64 -i - > $FL.aes.b64
else