Skip to content

Instantly share code, notes, and snippets.

@cowboy
cowboy / .gitignore
Created September 30, 2020 17:57
kicad gitignore
# Adapted from:
# https://github.com/github/gitignore/blob/master/KiCad.gitignore
# For PCBs designed using KiCad: http://www.kicad-pcb.org/
# Format documentation: http://kicad-pcb.org/help/file-formats/
# Temporary files
*.000
*.bak
*.bck
@cowboy
cowboy / bom.ini
Last active September 30, 2020 00:16
generate boms: combine 1 or more KiBoM generated csv files with an id column name like "Digikey" (where a digikey part number is stored) and output IMO a much better csv file (note: do NOT number rows or group fields)
; https://github.com/SchrodingersGat/KiBoM
;
[BOM_OPTIONS]
; General BoM options here
; If 'ignore_dnf' option is set to 1, rows that are not to be fitted on the PCB will not be written to the BoM file
ignore_dnf = 1
; If 'html_generate_dnf' option is set to 1, also generate a list of components not fitted on the PCB (HTML only)
html_generate_dnf = 1
; If 'use_alt' option is set to 1, grouped references will be printed in the alternate compressed style eg: R1-R7,R18
use_alt = 0
@cowboy
cowboy / unicornhd-animated-gif.py
Created August 4, 2020 16:34
animated gif viewer for UnicornHD
#!/usr/bin/env python3
'''
See
https://github.com/HimbeersaftLP/unicorn-hat-hd-gif-displayer/blob/master/unicorn-gif.py
'''
import signal
import time
from sys import exit
@cowboy
cowboy / animate-robots.lua
Created May 5, 2020 04:16
OBS Studio script to turn child items of a scene on/off over time
-- https://obsproject.com/docs/scripting.html
local obs = obslua
-- Globals
local function log(name, msg)
if msg ~= nil then
msg = " > " .. tostring(msg)
else
msg = ""
@cowboy
cowboy / usage.js
Last active April 14, 2020 14:22
react useLogChanges hook debugging hook
const MyComponent = () => {
const [count, setCount] = useState(0)
useLogChanges('MyComponent', { count, setCount })
return (
<>
<button onClick={setCount}>Increment counter</button>
<div>{count}</div>
</>
@cowboy
cowboy / abstraction-2020.js
Last active March 28, 2025 20:50
Abstraction.js 2020 Edition (ES6)
/*
* Abstraction.js 2020 Edition
*
* Copyright (c) 2020 "Cowboy" Ben Alman
* Licensed under the MIT license.
* http://benalman.com/about/license/
*/
let $elseif, $else, $if = state => state ? (
$elseif = () => () => {},
@cowboy
cowboy / CB_UpdateAssistMacro.lua
Last active June 4, 2023 05:28
WoW Classic :: CB_UpdateAssistMacro :: Update "/assist" line in a given macro to your current target
-- Copyright (c) 2019 "Cowboy" Ben Alman
-- Licensed under the MIT license
local function p(msg)
print("[CB_UpdateAssistMacro] " .. msg)
end
local function err(msg)
p("ERROR: " .. msg)
end
@cowboy
cowboy / CB_VendorAutoBuy.lua
Last active June 12, 2023 09:27
WoW Classic :: CB_VendorAutoBuy :: Automatically buy rare items from vendors
-- Copyright (c) 2019 "Cowboy" Ben Alman
-- Licensed under the MIT license
local frameName = "CB_VENDOR_AUTO_BUY_FRAME"
if not _G[frameName] then
_G[frameName] = CreateFrame("Frame")
_G[frameName]:RegisterEvent("MERCHANT_SHOW")
end
local function Set(list)
VER 3 0000000001000006 "#Arcane Shot" "INV_MISC_QUESTIONMARK"
#showtooltip
/cast [@mouseover,harm,nodead][@target,harm,nodead][@pettarget] Arcane Shot
/cast [@pettarget][@target] !Auto Shot
END
VER 3 0000000001000004 "#Concussive Shot" "INV_MISC_QUESTIONMARK"
#showtooltip
/cast [@mouseover,harm,nodead][@target,harm,nodead][@pettarget] Concussive Shot
/cast [@pettarget][@target] !Auto Shot
END
@cowboy
cowboy / for-sale.md
Last active August 25, 2019 15:51
Eurorack Modules For Sale - updated 8/25/2019

Everything is in very good condition, most items have the original packaging. Pics available upon request. I can meet you in the Boston / Metro West area or ship. Prices are negotiable, within reason. Shipping is extra.

Eurorack Modules For Sale

Gate + CV Sequencer

$450 - Intellijel - Metropolis
$220 - Qu-Bit - Octone

Trigger/Gate Sequencer

$375 - Malekko - Varigate 8+