Skip to content

Instantly share code, notes, and snippets.

View jhyland87's full-sized avatar

J jhyland87

  • 48°52.6′S 123°23.6′W
View GitHub Profile
@jhyland87
jhyland87 / get-hz.cpp
Created March 2, 2026 04:30
Get the vibration Hz from QMI8658 output
#include <Arduino.h>
#include <Wire.h>
#include <QMI8658.h>
#include <arduinoFFT.h>
#define SDA_PIN 8
#define SCL_PIN 9
// ================= SETTINGS =================
static constexpr uint16_t N = 256; // FFT size
@jhyland87
jhyland87 / replace_font_size.py
Created January 11, 2026 20:29
Replace KiCad symbol font sizes
#!/usr/bin/env python3
"""
Script to replace font sizes in KiCad .kicad_sym files.
Specifically replaces instances where font size is set to 1.27 with a new value.
Usage:
python replace_font_size.py <input_file> <new_size> [output_file]
If output_file is not specified, the input file will be modified in place.
@jhyland87
jhyland87 / photobucket-select-all.js
Last active December 11, 2025 16:35
Select all photobucket images
const selectMode = () => {
const selectModeButton = document.querySelector('[data-test="select-mode"]');
if ( ! selectModeButton )
throw new Error('No select mode button found')
if ( selectModeButton.textContent === 'Cancel' ) {
console.log('Already in select model')
return;
}
@jhyland87
jhyland87 / fetch.py
Created February 10, 2025 23:01
Simple price fetcher for laboratoriumdiscounter
import requests
import sys
search_string = sys.argv[1]
headers = {
'accept': 'application/json, text/javascript, */*; q=0.01',
'referer': 'https://www.laboratoriumdiscounter.nl/en/',
'x-requested-with': 'XMLHttpRequest',
}
@jhyland87
jhyland87 / forum_post.md
Created January 5, 2025 04:38
Post intended for future4200

Here's an Imgur album I just uploaded a bunch of screenshots to - https://imgur.com/a/24-45-gl45-adaptor-vHJwzqn But since I know people don't like clicking on links, here's a few pictures from the post: 5xEVXLH|666x500 sdCvG80|375x500

Now this solution works great for me, but when getting this post ready for yall, I stumbled across something that might work better: https://www.laborxing.com/collections/stoppers/products/gl45-screw-cap-with-ptfe-joint-adapter?variant=46214047531225

@jhyland87
jhyland87 / bash_colors.sh
Last active November 10, 2024 16:43
Prusa sliced gcode diff
#!/usr/bin/env bash
# Set fg color with \e[38;5;${COLOR}m:
# echo -e '\e[38;5;17mTest\e[0m'
# echo -e '\e[38;5;226mYellow text\e[0m'
# Set bg color with \e[48;5;${COLOR}m:
# echo -e '\e[48;5;17mBlue background\e[0m'
# Change the fg and bg colors:
@jhyland87
jhyland87 / dictionary_attack_checker.sh
Last active August 30, 2024 12:03
Function to check if a string (password) can be found in online reverse sha1/md5 checksum dictionaries.
function checkmd5 {
local string="${1?No string provided to test}"
local checksum=$(printf "${string}" | md5sum | awk '{print $1}')
printf "%10s: %s\n" "string" "${string}"
printf "%10s: %s\n" "checksum" "${checksum}"
printf "%10s: %s\n" "type" "MD5"
printf "%10s: %s" "result" "Checking..."
/**
* Wait For Element - Creates a MutationObserver to watch for an element to be created.
*
* @param {object|string} selectorObj - The object with the selector and other params; Can also be a string
* value of the selector.
* @property {string} [selectorObj.selector] - The string to use as the querySelector value.
* @property {boolean} [selectorObj.multiple] - Determines if the mutation observer should be removed after
* the first match or not.
* @property {boolean} [selectorObj.verbose] - If true, some debug logs will be output to console.
* @see https://stackoverflow.com/a/61511955/1596569
@jhyland87
jhyland87 / .fluidd-theme___custom.css
Last active September 5, 2024 15:25
Custom fluidd theme that sets the background image to the webcam stream, and forces all cards to be semi-transparent until hovered over
/*
rgb(from var(--v-card-background-color) calc(r - 75) g b / 50%)
rgb(from var(--v-card-heading-base) calc(r + 40) calc(g + 40) b / 50%)
--v-card-background-color
*/
/* BG Animation */
:root {
All files were found via Googling:
site:oregontechsfcdn.azureedge.net filetype:pdf inurl:library-documents
or for specific chapters:
site:oregontechsfcdn.azureedge.net filetype:pdf inurl:library-documents inurl:chapter-1
#https://www.google.com/search?q=site%3Aoregontechsfcdn.azureedge.net+inurl%3Alibrary-documents+filetype%3Apdf
Successful Searching in Oregon Tech Library’s Electronic Resources
https://oregontechsfcdn.azureedge.net/oregontech/library-documents/successful-searching-in-oregon-tech-library-electronic-resources2012.pdf