Skip to content

Instantly share code, notes, and snippets.

@kemayo
kemayo / traitIDs.lua
Created August 7, 2025 02:13
World of Warcraft addon-contents that will show needed trait IDs on tooltips for generic talent trees
-- Trait trees
do
local lastTree, lastConfig
EventRegistry:RegisterCallback("GenericTraitFrame.SetTreeID", function(_, treeid, configid)
lastTree = treeid
lastConfig = configid
end)
EventRegistry:RegisterCallback("TalentDisplay.TooltipCreated", function(_, button, tooltip)
if lastTree then
@kemayo
kemayo / practical-guide-characters.markdown
Last active June 18, 2021 17:16
A Practical Guide To Evil playlist

A Practical Guide To Evil: A Playlist of Songs

I started thinking of this when I stumbled over a tumblr post by st-just a few years ago. There's still a few of those songs in here!

This is pretty comprehensive through Book Three. After that there's some scattered character and event themes, but nowhere near as much as before then.

We're going to do this in a few themed sections. This is character-theme songs. Later there'll be some per-book songs.

local myname, ns = ...
local Debug
do
local TextDump = LibStub("LibTextDump-1.0")
local debuggable = GetAddOnMetadata(myname, "Version") == '@project-version@'
local _window
local function GetDebugWindow()
if not _window then
_window = TextDump:New(myname)
@kemayo
kemayo / SilverDragon_MyCoolTheme.toc
Created November 29, 2020 03:23
Demonstration of a custom theme
## Interface: 90002
## Title: SilverDragon: My Cool Theme
## Author: Kemayo
## Dependencies: SilverDragon
addon.lua
local myname, addon = ...
local TextDump = LibStub("LibTextDump-1.0")
addon.debuggable = GetAddOnMetadata(myname, "Version") == '@project-version@'
local _window
local function GetDebugWindow()
if not _window then
_window = TextDump:New(myname)
end
return _window
local options = {
type = "group",
name = "Testing of toggle",
get = function(info) return true end,
set = function(info, value) end,
args = {},
}
for i=1,1000 do
options.args["toggle" .. i] = {
type = "toggle",
@kemayo
kemayo / Brewfile
Last active November 9, 2024 02:34
My Brewfile, as of November 8th 2024
tap "homebrew/bundle"
tap "homebrew/cask-drivers"
brew "cask"
brew "mas"
brew "carthage"
brew "colordiff"
brew "composer"
brew "curl"

Keybase proof

I hereby claim:

  • I am kemayo on github.
  • I am kemayo (https://keybase.io/kemayo) on keybase.
  • I have a public key ASB335_X5waMYbD78zwg4QiNhEZTbHWivZw-aPzgcHkNOAo

To claim this, I am signing this object:

( function ( $ ) {
$.fn.openInNewWindow = function () {
var rel;
if ( this.tagName.toLowerCase() === 'a' ) {
this.setAttribute( 'target', '_blank' );
rel = this.getAttribute( 'rel' );
this.setAttribute( 'rel', rel ? ( rel + ' noopener' ) : 'noopener' );
}
}
)( jQuery )
@kemayo
kemayo / clicktest.py
Last active October 30, 2017 04:24
Test for click, of somewhat abusive dynamic subcommand creation and argument passing.
import re
import click
# This is obviously a placeholder for testing purposes, and would actually use Site.matches
sites = {}
for site in ('archiveofourown', 'fanfiction', 'spacebattles'):
@click.command()
@click.argument('url')
def cmd(url, *args, **kwargs):