Skip to content

Instantly share code, notes, and snippets.

View spuder's full-sized avatar

Spencer Owen spuder

View GitHub Profile
@spuder
spuder / .gitignore
Last active April 9, 2024 15:22 — forked from markusand/Brewfile
macOS auto setup
Brewfile.lock.json
@spuder
spuder / Print Calendar
Created December 21, 2023 17:34
Apple Script to print out 1 month calendar, removing all digital calendars (e.g birthdays/holidays)
tell application "Calendar" to quit
delay 2
tell application "Calendar"
activate
end tell
tell application "System Events"
delay 2 -- Wait for Calendar to activate
key down {command}
keystroke "p" -- Command + P to print
key up {command}
@spuder
spuder / LICENSE.txt
Last active December 3, 2023 12:07
python script to generate .pdf and .gerber files from a kicad project
MIT License
Copyright (c) [spuder] 2022
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@spuder
spuder / augeas.ps1
Last active June 27, 2023 05:01
Powershell replace single xml line
# Based on this script https://ask.puppetlabs.com/question/4749/augeas-or-alternative-xml-modification-on-windows/
# I had to flip the logic if $node.NodeType -ne 'Element' to get it to work properly
[CmdletBinding()]
param (
[string] $filename = $(throw "filename is a required parameter"),
[string] $xpath = $(throw "xpath is a required parameter"),
[string] $value = $(throw "value is a required parameter")
)
@spuder
spuder / LICENSE
Last active May 22, 2023 17:10
Script to help recover nomad servers that have lost leadership
Mozilla Public License, version 2.0
1. Definitions
1.1. "Contributor"
means each individual or legal entity that creates, contributes to the
creation of, or owns Covered Software.
1.2. "Contributor Version"
@spuder
spuder / Tesmart RS232.md
Last active May 11, 2023 08:09
Tesmart RS232

Tesmart KVM have a RS232 connection that can be used to switch inputs remotely.

Example compatible hardware

  • HKS0802A1U

Hardware

Option A:

  • USB to RS232 Adapter (Any should work, but I use this one )
@spuder
spuder / README.md
Last active April 8, 2023 20:10
Arudino PWM control AnkerMake M5
@spuder
spuder / README.md
Last active March 19, 2023 23:40
AnkerMake M5 Gcodes
Process: WindowServer [277]
Path: /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer
Identifier: WindowServer
Version: 600.00 (451.4)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
Responsible: WindowServer [277]
User ID: 88
Date/Time: 2021-03-01 10:41:43.651 -0700
@spuder
spuder / README.md
Last active August 28, 2022 15:39
digispark USB fun

Digispark doesn't allow using the normal Serial.println() that an arduino uses becuase it doesn't show up as a com port.

Instead you need to use hidapitester or https://github.com/Bluebie/digiusb.rb ruby app to read from USB data.

Digispark has VID/PID of 16C0/05DF

bluebie/digiusb

Start the digterm ruby app and enter 1 in the terminal. When 1 is pressed, the blue LED (pin 1) should turn on for 1/10 of a second