Skip to content

Instantly share code, notes, and snippets.

@dieseltravis
dieseltravis / loading.svg
Created December 2, 2025 20:47
animated css loading svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dieseltravis
dieseltravis / CSS-Box-Shadow-lines.html
Last active November 25, 2025 19:45
Drawing lines with CSS box shadow
<!doctype html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Section + Aside with 'T' and decorative lines</title>
<style>
:root {
/* decorative T-shape dimensions and colors */
--t-height: 40px;
body {
padding:40px;
--size: 5vw;
--margin: 1vw;
--stroke: 2px;
}
.expander{
border: 1px solid #000;
width: var(--size);
height: var(--size);
curl -X PUT \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $TOKEN" \
https://api.github.com/notifications \
-d '{"last_read_at":"2025-08-31T00:00:00Z"}'
@dieseltravis
dieseltravis / _install-certbot.sh
Last active November 24, 2025 03:46
omg.lol letsencrypt certbot scripts
sudo apt install certbot
mkdir -p {.secrets,.config/letsencrypt}
sudo chmod -R 0700 {.secrets,.config/letsencrypt}
sudo chown pi:pi ~/.config/letsencrypt
#https://home.omg.lol/address/travis/dns/#dns-form
#https://toolbox.googleapps.com/apps/dig/#TXT/
@dieseltravis
dieseltravis / helpful-reminder.css
Last active September 19, 2025 21:23
helpful print css you should use on your web pages
@media print {
* {
background-color: #fff;
color: #fff;
visibility: hidden;
break-after: always;
break-before: always;
}
*::before, *::after {
content: "Don't waste paper!";
@dieseltravis
dieseltravis / Wire_nRF52.cpp
Last active August 6, 2025 13:46
Demo of using BMP280+AHT20 sensor on I2C with a Seeed Xiao nRF52840 Sense, and modifications to files in the Arduino packages to use different pins for SDA/SCL
// C:\Users\travis\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10\libraries\Wire\Wire_nRF52.cpp
// ----------------------------------------^
// Edit line # 32
#if defined(ARDUINO_Seeed_XIAO_nRF52840) || defined(ARDUINO_Seeed_XIAO_nRF52840_Sense) || defined(ARDUINO_Seeed_XIAO_nRF52840_Sense_SDA6SCL7) || defined(ARDUINO_Seeed_XIAO_nRF52840_Plus) || defined(ARDUINO_Seeed_XIAO_nRF52840_Sense_Plus) || defined(ARDUINO_TRACKER_T1000_E_LORAWAN)
@dieseltravis
dieseltravis / travis.atomic.omp.json
Last active June 14, 2025 01:35
oh-my-posh theme, customized atomic
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#0077c2",
"foreground": "#ffffff",
"leading_diamond": "\u256d\u2500\ue0b6",
@dieseltravis
dieseltravis / tiny-turbo-button.ino
Last active April 10, 2025 05:19
button and ssd1306 i2c display for arduino, nano, and tiny85/88
#include <TinyWireM.h>
#include <Tiny4kOLED.h>
// running example: https://wokwi.com/projects/427807116301408257
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
//#define SCREEN_ADDRESS 0x78 //0x3D // See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32
#define SCREEN_ADDRESS 0x3C
static uint8_t buttonPin = 3;
format = """
[](#DA627D)\
$directory\
[](fg:#DA627D bg:#DC815D)\
$git_branch\
$git_status\
[](fg:#DC815D bg:#76ABC8)\
$c\
$cmake\
$dotnet\