Skip to content

Instantly share code, notes, and snippets.

View jumblies's full-sized avatar
🕸️
Focusing

jumblies

🕸️
Focusing
View GitHub Profile
@jumblies
jumblies / scantofile.sh
Created July 8, 2023 18:54
20230708 Brother brscan-skey scantofile.sh script with renaming
#!/bin/sh
#
# $1 = scanner device
# $2 = friendly name
# 100,200,300,400,600
# 200 is a little more than half the size but still readable.
resolution=300
device=$1
device='brother4:net1;dev0'
#BASE= /home/glamke/brscan
@jumblies
jumblies / gist:4cf107fc756b660957f8871268f7c762
Created July 6, 2023 08:13
Brother scantofile script mod to generate pdf from brscan-skey
#! /bin/sh
#
# $1 = scanner device
# $2 = friendly name
# 100,200,300,400,600
# 200 is a little more than half the size but still readable.
resolution=300
device=$1
device='brother4:net1;dev0'
#BASE= /home/glamke/brscan
@jumblies
jumblies / XPath Cheat Sheet
Created August 19, 2022 08:39 — forked from jmaccabee/XPath Cheat Sheet
Common XPath tips and tricks
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// Credit to the original author: https://gist.github.com/LeCoupa/8c305ec8c713aad07b14
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
{
"annotations": {
"list": [
{
"builtIn": 1,
"data ": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@jumblies
jumblies / gist:ed1c370c9587c40157dbe434970368fa
Created September 1, 2019 21:16
Possible memory leak fix
bool stopPlaying() {
bool stopped = false;
if (rtttl) {
rtttl->stop();
delete rtttl;
rtttl = nullptr;
stopped = true;
}
if (mp3) {
mp3->stop();
@jumblies
jumblies / boom.ino
Created June 29, 2019 20:13
fireworks
#include <FastLED.h>
#define NUM_LEDS 120
#define DATA_PIN 6
CRGB leds[NUM_LEDS]; // sets up block of memory
#define NUM_SPARKS 61 // max number (could be NUM_LEDS / 2);
float sparkPos[NUM_SPARKS];
float sparkVel[NUM_SPARKS];
float sparkCol[NUM_SPARKS];
float flarePos;
@jumblies
jumblies / folder_maker.bat
Created May 4, 2019 14:24
Windows Cascading Directory Creator Batch Commands
:: Folder maker for spawning folders by years
:: generates a list of numbers (start, step, stop) and makes directories for it.
:: Can do a dry run first with DO echo %%G if you want to check it.
FOR /L %%G in (2010,1,2018) DO mkdir %%G
:: For Months
:: FOR /L %%G in (202501,1,202512) DO mkdir %%G
@jumblies
jumblies / scrapy.bat
Created April 1, 2019 15:16
powershell launch
@echo off
start powershell.exe -noexit -command "cd c:\Users\glamke\AppData\Local\Programs\Python\Python37-32\scrapy"; ".\Scripts\activate"; "cd pbike"
@jumblies
jumblies / slowcat.sh
Created August 3, 2018 10:16
slow cat of files
#!/bin/sh
# A program to slowly cat file or standard input.
if [ "$1" ] ; then
file="$1"
else
file="-"
fi
@jumblies
jumblies / regex
Created March 21, 2018 09:21
SuperRegex for study parsing with USROC
super_regex = '(?:[\r\n]*)([\'A-Z -\.]*)(?:[\r\n]+)(\[.+||\s])\s*(CURRENT STUDY:[A-Z\s/\[\]]+)([\d-]+)\s([\d:]+)\s(\[DOB:[\s0-9/]+])\s+(\[ID:.+])\s*(?:USE . LINK)\s*(Read Date: \d{4}-\d{2}-\d{2})\s*(Read Time: \d{2}:\d{2}:\d{2})'