Skip to content

Instantly share code, notes, and snippets.

View spuder's full-sized avatar

Spencer Owen spuder

View GitHub Profile
@spuder
spuder / compose.yaml
Last active November 7, 2026 13:52
forgejo
services:
forgejo:
image: codeberg.org/forgejo/forgejo:15.0.2
container_name: forgejo
restart: unless-stopped
volumes:
- /mnt/NVMe/Docker/forgejo/data:/data
environment:
- FORGEJO__server__DISABLE_SSH=false
- FORGEJO__server__START_SSH_SERVER=true
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@spuder
spuder / .gitignore
Last active September 18, 2024 21:43 — 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 / 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
@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

@spuder
spuder / Tesmart RS232.md
Last active August 18, 2026 18:48
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 )

Produces 360 images

This uses --animate which doesn't work with more than 3 frames when running in a docker container spuder/openscad-dockerhub#2

openscad /dev/null -D '$vpt = [0,0,0];' -D '$vpd = 20; $vpr = [0,$t * 360,0];' -o 'foo.png' -D 'cube([2,3,4]);' --imgsize=250,250 --animate 360 --colorscheme "Tomorrow Night"

The following all work, but not very well

@spuder
spuder / CAD .zshrc
Last active March 28, 2022 18:50
Bash create git repo for CAd files
# A bash function that will create a new git repo and configure the user.email
# Usage: Add this to your ~/.bashrc or ~/.bash_profile or ~/.zshrc files
function f360 {
_basepath="${HOME}/Code/github/spuder"
if [[ -z "$1" ]]; then echo "Usage: f360 foobar"; return 1; fi
if [[ ! -d "${_basepath}" ]]; then echo "${_basepath} doesn't exist"; return 1; fi
if [[ -d "${_basepath}/$1" ]]; then echo "Directory ${_basepath}/${1} already exists"; return 1; fi
echo "Creating ${_basepath}/${1}"
mkdir $_basepath/$1
cd $_basepath/$1