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 / CB_UpdateAssistMacro.lua
Last active Oct 10, 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 Oct 10, 2019
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 Oct 21, 2018
/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>
@cowboy
cowboy / bookmarklet.js
Last active Mar 16, 2018
reddit megalinks: attempt to base64 decode all words 16+ chars in length
View bookmarklet.js
javascript:(function()%7B%5B...document.querySelectorAll('.usertext-body%20*')%5D.forEach(p%20%3D%3E%5B...p.childNodes%5D.filter(n%20%3D%3E%20n.nodeType%20%3D%3D%3D%203).forEach(n%20%3D%3E%20%7Bconst%20re%20%3D%20%2F%5CS%7B16%2C%7D%2Fg%3Bif%20(re.test(n.nodeValue))%20%7Btry%20%7Blet%20isHtml%2C%20child%3Bconst%20s%20%3D%20n.nodeValue.replace(re%2C%20s%20%3D%3E%20%7Bs%20%3D%20atob(s)%3Bif%20(%2F%5Ehttps%3F%3A%5C%2F%5C%2F%2F.test(s))%20%7Bs%20%3D%20%60%3Ca%20href%3D%22%24%7Bs%7D%22%20target%3D_blank%3E%24%7Bs%7D%3C%2Fa%3E%60%3BisHtml%20%3D%20true%3B%7Dreturn%20s%3B%7D)%3Bif%20(isHtml)%20%7Bconst%20tmp%20%3D%20document.createElement('div')%3Btmp.innerHTML%20%3D%20s%3Bchild%20%3D%20document.createDocumentFragment()%3B%5B...tmp.childNodes%5D.forEach(c%20%3D%3E%20child.append(c))%3B%7D%20else%20%7Bchild%20%3D%20document.createTextNode(s)%3B%7Dp.replaceChild(child%2C%20n)%3B%7D%20catch%20(e)%20%7B%7D%7D%7D))%7D)()
View Dockerfile
FROM ubuntu
RUN apt-get update
RUN apt-get install -y build-essential curl
# NodeJS >= 6.0
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs
# ttfautohint
@cowboy
cowboy / mock-axios.js
Last active Sep 12, 2019
axios mocking via interceptors
View mock-axios.js
import axios from 'axios'
let mockingEnabled = false
const mocks = {}
export function addMock(url, data) {
mocks[url] = data
}
You can’t perform that action at this time.