Skip to content

Instantly share code, notes, and snippets.

View no-tone's full-sized avatar

no-tone no-tone

View GitHub Profile
@no-tone
no-tone / sketch_simonsays.ino
Created May 3, 2026 15:07
v1 of a Simon Says game, made to test on an Arduino Uno.
/////////////////////////////////////////////////
// Simon Says - Arduino
// LEDs + Buzzer + 1 Button Input
/////////////////////////////////////////////////
#define LEDS 6
int leds[] = {13,12,11,10,9,8};
int btn = 2;
int buz = 4;
@no-tone
no-tone / ente_json_to_exif.py
Last active May 3, 2026 18:56
Apply capture timestamps from an Ente export's JSON metadata into the actual media files using 'exiftool'.
"""ente_json_to_exif.py
Prereqs
- Python 3.9+
- ExifTool installed and on PATH
macOS (Homebrew): brew install exiftool
- Python dependency:
pip install tqdm
Usage
@no-tone
no-tone / battery_monitor.sh
Created January 5, 2026 16:51
A Bash script that monitors battery status and shuts down Docker services and the laptop when the battery level falls below 15%.
#!/bin/bash
# Setup Instructions:
# After creating this script, run the following commands:
# 1. Change ownership to your user (if needed):
# sudo chown tn:tn ~/self/battery_monitor.sh
# 2. Make the script executable:
# chmod +x ~/self/battery_monitor.sh
# 3. Edit crontab to schedule the script:
# crontab -e
@no-tone
no-tone / reset_cursor_id_unix.sh
Created January 4, 2026 20:09
Script to reset identification values in Cursor Editor's storage.json file for Linux, and macOS.
#!/bin/bash
# Make the script executable: chmod +x reset_cursor_id_unix.sh
# Run the script: ./reset_cursor_id_unix.sh
# Display the important message on the terminal
echo "========================================="
echo "IMPORTANT: Please read the README carefully before running the script for the best results."
echo "========================================="
@no-tone
no-tone / cmdline.lua
Last active December 2, 2025 17:36
My NeoVim + NVChad plugins' file, custom cmdline file and a LSP + Formatters auto install file.
-- Folder: nvim_backup/lua/custom/cmdline.lua
local cmp = require("cmp")
-- Command-line completion for :
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "cmdline" }, -- provides command completions
},
@no-tone
no-tone / PCF8591.py
Last active September 27, 2025 17:04
Raspberry Pi 5 snake game with joystick support and a buzzer alert, connected through a breadboard and an ADC module.
#!/usr/bin/env python3
#------------------------------------------------------
#
# This is a program for PCF8591 Module.
#
# Warnng! The Analog input MUST NOT be over 3.3V!
#
# In this script, we use a poteniometer for analog
# input, and a LED on AO for analog output.
#