Skip to content

Instantly share code, notes, and snippets.

@hernan43
hernan43 / flipper_zero_lora_cheatsheet.md
Last active January 28, 2024 16:20
Flipper Zero LoRa cheatsheet
@hernan43
hernan43 / index.html
Created April 11, 2022 18:31
Javascript Canvas Sketchpad
<head>
<link href='https://fonts.googleapis.com/css?family=Poiret+One' rel='stylesheet' type='text/css'/>
</head>
<header>
<h1>Sketch Pad: Go ahead! Be an Artist. (HTML5 "Canvas" tag with some Javascript) </h1>
</header>
<!-- HTML FOR JAVASCRIPT SKETCHBOOK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<section>
@hernan43
hernan43 / docker-compose.yml
Last active January 21, 2021 16:40
Sample n8n
version: "3"
services:
n8n:
image: n8nio/n8n:latest-rpi
ports:
- 5678:5678
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=something
#Delete danging docker images
docker rmi $(docker images --quiet --filter "dangling=true")
echo "$(date "+%m-%d-%Y %T") : Cleaned up dangling docker images" >> $LOGFILE 2>&1
#Delete DS Store file types after 7 days, uses a dstore.txt to keep track on every run.
read dsStoreRun < /tmp/dstore.txt
if ((dsStoreRun == 7)); then
find /mnt/user -maxdepth 9999 -noleaf -type f -name ".DS_Store" -exec rm "{}" \;
echo "$(date "+%m-%d-%Y %T") : Deleted .DS_Store Files" >> $LOGFILE 2>&1
dsStoreRun=0
@hernan43
hernan43 / code.py
Last active January 7, 2021 20:29
MagTag Rocket launch tracker using RocketLaunch API
# SpaceX Launch Display, by Anne Barela November 2020
# MIT License - for Adafruit Industries LLC
# See https://github.com/r-spacex/SpaceX-API for API info
import time
import terminalio
from adafruit_magtag.magtag import MagTag
months = ["January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"]
@hernan43
hernan43 / Dockerfile
Created October 26, 2020 14:04
Dockerfile line I want to keep
RUN bundle install --jobs `expr $(cat /proc/cpuinfo | grep -c "cpu cores") - 1` --retry 3
@hernan43
hernan43 / settings.json
Created September 20, 2020 18:41
Baseline Windows Terminal settings
// This file was initially generated by Windows Terminal 1.2.2381.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@hernan43
hernan43 / vid2gif.sh
Created April 16, 2020 19:11
Simple video file to GIF file using FFMPEG/ImageMagick script
#!/usr/bin/env bash
FFMPEG=/usr/local/bin/ffmpeg
CONVERT=/usr/local/bin/convert
if [ -z "$1" ] || [ -z "$2" ]
then
echo "Must specify an input video file and output gif file"
exit 1
fi
@hernan43
hernan43 / MiSTer.ini
Created November 14, 2019 17:26
MiSTer FPGA custom modeline for Dell 2007FP 20.1 Inch Ultrasharp 1600x1200
[MiSTer]
key_menu_as_rgui=0 ; set to 1 to make the MENU key map to RGUI in Minimig (e.g. for Right Amiga)
forced_scandoubler=0 ; set to 1 to run scandoubler on VGA output always (depends on core).
ypbpr=0 ; set to 1 for YPbPr on VGA output.
composite_sync=0 ; set to 1 for composite sync on HSync signal of VGA output.
vga_scaler=1 ; set to 1 to connect VGA to scaler output.
hdmi_audio_96k=0 ; set to 1 for 96khz/16bit HDMI audio (48khz/16bit otherwise)
keyrah_mode=0x18d80002 ; VIDPID of keyrah for special code translation (0x23418037 for Arduino Micro)
volumectl=0 ; enable audio volume control by multimedia keys
vscale_mode=1 ; 0 - scale to fit the screen height.
@hernan43
hernan43 / get_windows_key.bat
Created October 31, 2019 15:04
Get Win 10 key from BIOS if it is in there.
(Get-WMIObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey