Skip to content

Instantly share code, notes, and snippets.

@sigmasternchen
sigmasternchen / ip-sentence.js
Created October 2, 2025 18:03
Convert IPv4 addresses into grammatically correct English sentences, and back.
const data = {
"adjectives":["adorable","affectionate","aggressive","agreeable","alert","amazing","ambitious","angry","anxious","appealing","artistic","athletic","attractive","auspicious","authoritative","balanced","bold","brave","bright","brilliant","bubbly","calm","candid","capable","carefree","careful","caring","charming","cheerful","clever","clumsy","cooperative","courageous","creative","curious","daring","defensive","delightful","determined","diligent","dramatic","dynamic","eager","easygoing","elegant","energetic","enthusiastic","expressive","faithful","fearless","friendly","funny","generous","gentle","genuine","gloomy","graceful","grateful","gregarious","grumpy","handsome","happy","hardworking","harmonious","hasty","helpful","honest","humble","humorous","imaginative","immature","immortal","insecure","intelligent","intuitive","inventive","jack-of-all-trades","jovial","joyful","kind","kooky","lazy","lighthearted","lively","loyal","lucky","mature","mellow","meticulous","modest","motivated","mysterious",
@sigmasternchen
sigmasternchen / dyndns.sh
Created April 15, 2023 20:16
DynDNS (OVH)
#!/usr/bin/env bash
user="$USER"
password="$PASSWORD"
host="$HOST"
iplookup=https://icanhazip.com
lastip=""
@sigmasternchen
sigmasternchen / gof.py
Last active January 24, 2025 14:12
Convolution Game Of Life
import cv2
import imageio
import numpy
image = cv2.imread("input.png")
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
image[image > 128] = 255
image[image < 129] = 0
kernel = numpy.array([
@sigmasternchen
sigmasternchen / speedup.sh
Last active November 12, 2021 22:09
Speed Up Video Files
#!/bin/bash
file=$1
duration=$2
help() {
cat <<EOF
SYNMOPSIS: speedup FILE LENGTH
LENGTH is in seconds
@sigmasternchen
sigmasternchen / grub-tune.go
Created May 10, 2021 16:57
Grub Tune Generator
package main
import (
"fmt"
"math"
"strconv"
"strings"
)
const (
<button onclick="start()" id="start">Start</button>
<script>
var audio;
const TEMPO = 120;
const BEATS = 4;
const SUB = 8;
const OSCILLATOR = 1;
const PERCUSSION = 2;
(function() {
let cookieWindowStyle = {
"position": "fixed",
"bottom": "0",
"width": "50%",
"background-color": "black",
"color": "white",
"padding": "3%",
"padding-bottom": "0",
"left": "25%",
@sigmasternchen
sigmasternchen / filetransfer.sh
Last active September 14, 2015 21:29
filetransfer.sh
#!/bin/bash
# sends oncompressed data from server to client
# dependencies: tar, pv, awk, netcat
#
#
# usage: {server | client} directory port [remote-address]
#
# remote-addess: use only in client mode
if test "$1" = "server"; then