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 / 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 September 19, 2023 00:11
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==
@EleotleCram
EleotleCram / arduino-tools-and-projects.md
Created August 28, 2020 18:21
Arduino Tools and Projects

Repositories:

@EleotleCram
EleotleCram / blender-tools-and-projects.md
Last active January 2, 2021 15:57
Blender Tools and Projects
// arrayDepth() => 0
// arrayDepth([]) => 1
// arrayDepth([[]]) => 2
// arrayDepth([[[]]]) => 3
// arrayDepth([[[[]]]]) => 4
const arrayDepth = (ary) => _.isArray(ary) ? 1+arrayDepth(ary[0]) : 0;
@EleotleCram
EleotleCram / bus.js
Last active March 7, 2017 13:23
drop-in synchronous bus gist using jquery-node
const $ = require('jquery-node');
// Description: drop-in synchronous bus gist using jquery-node
// Usage:
//
// bus.on("foo", (...args) => {
// console.log("foo was triggered", args);
// });
// bus.subscribe({
// onFoo(...args) {console.log("foo triggered too", args)}