Skip to content

Instantly share code, notes, and snippets.

View bhagman's full-sized avatar

Brett Hagman bhagman

View GitHub Profile
@bhagman
bhagman / no-extension-server.py
Created December 7, 2025 02:59
Serve pages locally, ala Cloudflare Pages (no .html extension)
#!/usr/bin/env python3
"""
Serves files from the current directory, allowing access to HTML files
without requiring the .html extension in the URL.
For example, accessing '/login' will serve 'login.html'.
Accessing the root '/' will serve 'index.html'.
Files with other extensions will not be served without their extensions.
"""
@bhagman
bhagman / YTMVolumeFix.user.js
Last active October 15, 2025 18:19
YouTube Music Volume Fix
// ==UserScript==
// @name YouTube Music Volume Fix
// @author Brett Hagman
// @namespace https://gist.github.com/bhagman/f3043b28fa6bdf6a630bb192a8bf4a37
// @version 1.0.0
// @description Changes YTM volume slider to change based on a curve more suited to human hearing.
// @match https://music.youtube.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
@bhagman
bhagman / TinyGSM-FileDownload-Working.txt
Created June 12, 2019 07:25
TinyGSM FileDownload Working Output
Initializing modem...
AT
OK
AT+CFUN=15
OK
AT
AT
AT
@bhagman
bhagman / TinyGSM-FileDownload-Broken.txt
Created June 12, 2019 07:23
TinyGSM FileDownload Broken Output
Initializing modem...
AT
OK
AT+CFUN=15
OK
AT
AT
AT
@bhagman
bhagman / main.cpp
Created June 12, 2019 07:00
TinyGSM FileDownload Example (with minor changes, and set for u-blox SARA-R4, APN excluded)
#include <Arduino.h>
/**************************************************************
*
* For this example, you need to install CRC32 library:
* https://github.com/bakercp/CRC32
* or from http://librarymanager/all#CRC32+checksum
*
* TinyGSM Getting Started guide:
* https://tiny.cc/tinygsm-readme
*
/*
|| @author Brett Hagman <[email protected]>
|| @url http://wiring.org.co/
|| @contribution Hernando Barragan <[email protected]>
|| @contribution Alexander Brevig <[email protected]>
||
|| @description
|| | Time methods.
|| |
|| | Wiring Framework
@bhagman
bhagman / UNOWiFi_ThingSpeak_REST.ino
Created March 19, 2017 05:59
Using the ThingSpeak Data Service with an UNO WiFi (via REST)
/*
|| @author Brett Hagman <[email protected]>
|| @url https://roguerobotics.com/
||
|| @description
|| | A simple example of an UNO WiFi sending data to the ThingSpeak Data Service (REST).
|| | https://thingspeak.com/
|| |
|| | In the Arduino IDE, you will need to add the "Arduino Uno WiFi Dev Ed Library" in the Library Manager.
|| | Sketch > Include Library > Manage Libraries...
@bhagman
bhagman / UNOWiFi_Sparkfun_REST.ino
Last active March 19, 2017 05:57
Using the Sparkfun Data Service with an UNO WiFi (via REST)
/*
|| @author Brett Hagman <[email protected]>
|| @url https://roguerobotics.com/
||
|| @description
|| | A simple example of an UNO WiFi sending data to the Sparkfun Data Service.
|| | https://data.sparkfun.com/
|| |
|| | In the Arduino IDE, you will need to add the "Arduino Uno WiFi Dev Ed Library" in the Library Manager.
|| | Sketch > Include Library > Manage Libraries...
@bhagman
bhagman / Braccio.h
Last active May 3, 2016 10:34 — forked from AlexanderBrevig/Braccio.h
A new Braccio library
/*
Braccio.h - Library for controlling the Arduino Robotic Arm; Braccio!
Copyright (c) 2016 - Alexander Brevig & Brett Hagman
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
<Module>
<ModulePrefs
width="300"
height="106"
border="0"
description="Add Google Plus Badge to your Google Site."
author="Brett Hagman"
author_email="[email protected]">
<Require feature="dynamic-height"/>
</ModulePrefs>/>