Skip to content

Instantly share code, notes, and snippets.

Ben Alman cowboy

Block or report user

Report or block cowboy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cowboy
cowboy / animate-robots.lua
Created May 5, 2020
OBS Studio script to turn child items of a scene on/off over time
View animate-robots.lua
-- 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 Apr 14, 2020
react useLogChanges hook debugging hook
View usage.js
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 May 17, 2020
Abstraction.js 2020 Edition (ES6)
View abstraction-2020.js
/*
* 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 Oct 23, 2019
WoW Classic :: CB_UpdateAssistMacro :: Update "/assist" line in a given macro to your current target
View CB_UpdateAssistMacro.lua
-- 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 Apr 24, 2020
WoW Classic :: CB_VendorAutoBuy :: Automatically buy rare items from vendors
View CB_VendorAutoBuy.lua
-- 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)
View cowboy-macros-cache.txt
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 Aug 25, 2019
Eurorack Modules For Sale - updated 8/25/2019
View for-sale.md

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+

@cowboy
cowboy / black-hole-pixel.css
Created Apr 17, 2019
one pixel from the black hole image in css, zoomed in
View black-hole-pixel.css
body {
color: #000;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am cowboy on github.
  • I am cowboy (https://keybase.io/cowboy) on keybase.
  • I have a public key ASCStQH9JCVUsg2ijSRIKEkz9IfqOEi40cEDadZQHHORbgo

To claim this, I am signing this object:

@cowboy
cowboy / index.html
Last active Feb 25, 2020
/r/megalinks base64+bold text decoder
View index.html
<div id=content>
<div id=bm-link-container>
<p>Bookmarklet <em>(drag this to your bookmarks bar)</em></p>
<span id=bm-link></span>
</div>
<div id=bm-code-container>
<p>Bookmarklet Code <em>(processed by babel and URIencoded)</em></p>
<textarea id=bm-code readonly></textarea>
</div>
<div id=bm-source-container>
You can’t perform that action at this time.