Skip to content

Instantly share code, notes, and snippets.

View tomhermans's full-sized avatar
👻
tinkering

Tom Hermans tomhermans

👻
tinkering
View GitHub Profile
/* based on @file MultiKey.ino || @version 1.0 || @author Mark Stanley|| @contact [email protected]
|| @description This sketch is an example of how you can get multiple key presses from a keypad or keyboard.
|| #
*/
#include <Keypad.h>
#include <BleKeyboard.h>
// 135x240px display
#include <SPI.h>
#include <TFT_eSPI.h> // Hardware-specific
TFT_eSPI tft = TFT_eSPI(135, 240);
/**
This Node.js script converts WebP images to either PNG or JPG format.
It's a command-line tool that processes all WebP files in a specified input folder and saves the converted images in a new output folder with a unique timestamp.
more info below:
*/
const fs = require('fs');
const path = require('path');
const sharp = require('sharp');
const readline = require('readline');
{
"colors": {
"primary-color": "#ff2222",
"secondary-color": "#77878d"
},
"fonts": {
"primary-font": "chalkduster",
"secondary-font": "Times New Roman, serif"
},
"typesize": {
// run: node avifconvert.js
const fs = require('fs');
const path = require('path');
const sharp = require('sharp');
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
// manifest.json
{
"manifest_version": 3,
"name": "Amazon Price Difference Highlighter",
"version": "1.0",
"description": "Highlights items with significant price differences in Amazon cart",
"permissions": ["activeTab"],
"content_scripts": [
{
"matches": [
#!/bin/bash
# Convert all TTF files in the current directory using pyftsubset
# Creates subsetted versions in TTF, WOFF, and WOFF2 formats
# Usage: ./pyftall.sh [format] [options]
# format: ttf (default), woff, woff2, or all
# Any additional options will be passed to pyftsubset
# You can also add any additional parameters for pyftsubset after the format option:
@tomhermans
tomhermans / index.html
Created March 21, 2025 16:13
miniml placeholder template
<header>
<div>
<p>Tom Hermans</p>
</div>
<div>
<h1>Hi, I'm Tom. <br> I work at the intersection of design and code. </h1>
<img src="https://assets.codepen.io/11287/internal/avatars/users/default.png?fit=crop&format=auto&height=512&version=1738491399&width=512" alt="">
</div>
</header>
<section class="intro">
/* Image Resize and Compress Script
* --------------------------------
* This script resizes images in a specified folder and saves them to a new folder with a timestamp. It allows the user to specify the target width, height, and compression quality. The script also handles errors gracefully and provides feedback on the processing status.
*
* Features:
* - Interactive prompts for input folder, dimensions, and compression
* - Preserves aspect ratio (optional)
* - Creates a timestamped output folder
* - Applies JPEG compression with quality control