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 / 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; }
@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 / 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 / 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 / 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 / tasmota_ufs.py
Created June 21, 2024 14:52
Manage Tasmota UFS from python
#!/usr/bin/env python3
import sys
import os
import requests
# Function to show help message
def show_help():
print("Usage: tasmota_ufs.py --hostname TASMOTA_DEVICE [OPTIONS] CMD [ARGS]")
print("")
@EleotleCram
EleotleCram / tasmota_ufs.sh
Created June 21, 2024 14:32
Manage Tasmota UFS from bash
#!/bin/bash
# Function to show help message
show_help() {
echo "Usage: $0 --hostname TASMOTA_DEVICE [OPTIONS] CMD [ARGS]"
echo ""
echo "Commands:"
echo " PUT FILE DEST_PATH Upload a file to the specified destination path."
echo " GET FILE_PATH [-o OUTPUT_FILE] Download a file from the specified path."
echo " GET FILE_PATH TARGET_DIR Download a file from the specified path to the target directory."
@EleotleCram
EleotleCram / every.h
Last active May 29, 2021 21:47
Simple Arduino non-blocking interval macros
#pragma once
// Utility macros for periodically doing stuff in a non-blocking loop.
// Usage:
//
// void loop() {
// EVERY(2.5 SECONDS) {
// static bool ledOn = false;
// ledOn = !ledOn;
@EleotleCram
EleotleCram / autocadass
Created April 13, 2021 19:06
Automation utility for conversion of CAD input files (.step, etc.) to .obj files using CAD Assistant, xdotool and xprop.
#! /bin/bash
# Auto CAD Assistant - Automation utility for conversion of CAD input files (.step, etc.) to .obj
# files using CAD Assistant, xdotool and xprop. Just give it a bunch of input CAD files and behold
# the robot as it automatically navigates and operates CAD Assistant.
# MIT License
#
# Copyright (c) 2021 Marcel Toele
#
@EleotleCram
EleotleCram / google-image-search-dim-overlay.tampermonkey.js
Last active October 11, 2024 16:58
Tampermonkey script that adds back the dimension overlay in Google Image Search
// ==UserScript==
// @name Google Image Search Dimension Overlay
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Tampermonkey script that adds back the dimension overlay in Google Image Search
// @author EleotleCram
// @match https://www.google.com/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js
// @grant none
// ==/UserScript==