Skip to content

Instantly share code, notes, and snippets.

View EleotleCram's full-sized avatar

Marcel Toele EleotleCram

  • Amsterdam, The Netherlands
View GitHub Profile
@EleotleCram
EleotleCram / idf-docker
Created July 16, 2024 14:59
Espressif IDF wrapper script; use any IDF version without ever installing it...
#!/bin/bash
# A generic idf-docker wrapper script.
# This script must either be named like idf-v4.4.6, idf-v5.0.5, etc. (Select a tag from: https://hub.docker.com/r/espressif/idf/tags),
# or you can rename it like idf-docker and 'busybox symlink' to it using such names. (It will automatically use the version deduced from the name.)
#
# Afterwards use it just like idf.py [ARGS, ...] but instead write e.g.: idf-v4.4.6 [ARGS, ...]
die() {
echo "$1" 1>&2
@EleotleCram
EleotleCram / install-google-chrome-to-folder
Created October 8, 2024 12:08
Install a google-chrome .deb to a folder (will create google-chrome-VERSION in it) so that you can have multiple versions on your system
#!/usr/bin/env bash
# Print Help Message
function print_help() {
echo "Usage: $0 [OPTIONS] DEB_FILE DIR"
echo ""
echo "Install a Google Chrome .deb package to the specified directory."
echo ""
echo "Options:"
echo " -h, --help Show this help message and exit."
@EleotleCram
EleotleCram / scanline.js
Created May 15, 2025 10:27
Amiga Scanline Vibes (Youtube, Twitch, etc.)
// Paste in browser console
(() => {
let old = document.getElementById('scanline-overlay');
if (old) old.remove();
document.body.appendChild(Object.assign(document.createElement('div'), {
id: 'scanline-overlay',
style: 'position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:999999;background-image:repeating-linear-gradient(to bottom, rgba(0,0,0,0.3) 0px, rgba(0,0,0,0.3) 2px, transparent 2px, transparent 4px);'
}));
})();
@EleotleCram
EleotleCram / autocrat.sh
Last active May 21, 2025 11:47
autocrat.sh: devilspie(2) written in bash, but simpler and more versatile
#!/bin/bash
# autocrat.sh: devilspie(2) written in bash, but simpler and more versatile
# Decrees can be written by asking ChatGPT to formulate them.
# Use the following priming prompt to do so:
cat > /dev/null <<EOF
I am building a Bash script called autocrat.sh that manages window behavior in Linux, similar to devilspie2.
@EleotleCram
EleotleCram / ppng.io
Last active May 22, 2025 16:21
ppng.io - Securely transfer files or directories using a piping server
#!/bin/bash
set -euo pipefail
# ppng.io - Securely transfer files or directories using a piping server
#
# Learn more about the underlying principles at:
# https://github.com/nwtgck/piping-server#readme
die() { echo "Error: $1" >&2; exit 1; }