Skip to content

Instantly share code, notes, and snippets.

!nw13ZjUnq4)A6mTpKm8JC5UotFjqmxYmGHImTPViqylBRIrIkjdH8a)T3DLKbhYD96mzCS3D13U6B)2fAxAcLiOXD7FFNp)fkXqj9UT7D3EhLSLsYW)GakQuhORPewTTuPNUZkusd4WsjhNMNB4wAChWTmfCptjKGJHrXjrZPKuLQktDqsoi2XPdUyikRGJGksvs0ETHJ5zOQsPD2LwUwYQ(dU2a5Jg3RpLSHZ39Gzhp1oNbvHROKIT47sSsnwM2IVypczJivs4zwT2fWsVrdhYyMbR(TmH8s070C8Q89I)S)D1vgoE8CHuyk)FNoeAUHzr)UR(L7Bc0cC)1Z9SV75D4t4qM61Z5fbop21YS8xTlnLmGiFPvhiKX61O)qu(x)jt4Z0FC(CXLRWU4iT4TtR(9AwguZStRsEFUBx8DCG1XbwNRaZh9F1UsDM5v5b5YdlsM2kZjUlY0fjJFooky)DYRNJJJMVCW0KKPtM)8xFkPr(1ojALfy6ehbep9mqyciI34qf2R5yVCDTTxyeRRqfRRXvYffLG77HjJkfZnwak2LPvmJjiFxccZQQnsqCJwqzkg226kRWnTa44JhvQczbap5X5lE(XRcQfoXFQx)Ey0q5EfwwVaAKM)p1Cz6rO2VT3N8g9836ARvjNUNRRyhdokfPBKCOgG2dXQs33mE1TB)oWe2RneXn)6Nbg0P78O5guDGmwaiqJ)com)JvVxAYn7eCyWLf2siMoikYCrHFHc67LpSuzKMTL7ldYW5rrXWWhAIyrDP7U8MsT1FIARc5FejskRI7ClGLztu2dNwTvyqY)YMiuG8OWWG2DMBJs1UspMhezynIn9AeGYfJIEXU)qNC3ckK7opi3w4XsBwrEEJKfpGi825fhEnbSFq0ANQvlkkaOVmT7ne0CXW92P4K89CKwDxyyxMnTKBiLQdtH(KX9)jn31MLsucCTcN7joRcUEejayi1WQdNZzAEU4vGSNfnESxCxJv)GG485SWbCwj7a9fuFqLOznOH83eME
# Assist
# Targets whatever my pet is attacking and then start shooting. Mostly useful when I'm backing out of melee range or when fighting multiple things.
/target pettarget
/cast [harm, nodead] !Auto Shot
# BGSound
# Toggles whether or not sound is audible when the game client loses focus
/run SetCVar("Sound_EnableSoundWhenGameIsInBG",GetCVar("Sound_EnableSoundWhenGameIsInBG")=="0" and 1 or 0)
/script DEFAULT_CHAT_FRAME:AddMessage(GetCVar("Sound_EnableSoundWhenGameIsInBG")=="0" and "BG sound off" or "BG sound on")
#!/bin/zsh
# Redirect output to stderr.
exec 1>&2
# join_by from https://stackoverflow.com/questions/1527049/how-can-i-join-elements-of-an-array-in-bash
function join_by { local d=$1; shift; echo -n "$1"; shift; printf "%s" "${@/#/$d}"; }
# pattern is just all of these strings smushed into a big regex pattern
booboos=(
{"site"=>{"id"=>67811, "subdomain"=>"applicant-tracking-test"},
"component"=>
{"id"=>1048475,
"kind"=>"quantity_based_component",
"name"=>"Job posting advertisement",
"unit_name"=>"dollars",
"handle"=>"job-posting-advertisement"},
"subscription"=>
{"id"=>35754057,
"name"=>"Alex Luke",
#! /bin/zsh
fancy_git_pickaxe() {
# -S$1 -- pickaxe the first argument to the function
# "${@:2}" -- pass the remaining arguments along
git log -S$1 "${@:2}" \
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" \
--color=always |
# from https://gist.github.com/junegunn/f4fca918e937e6bf5bad
fzf --ansi --no-sort --reverse --tiebreak=index --bind=ctrl-s:toggle-sort \
0eNqtXNtu20gM/ZWFnq2FOHflsb+xKBZOrA2EtWVBkosGhf99ZQerpImV4SH91Lq2ecgzh5yhzOmv4nF/avqh7abi4Vcxdtu+nI7l89DuLq9/Fg+h2hQvxUM6b4r26diNxcNf8+fa5267v3xieumb4qFop+ZQbIpue7i8emy280eLy1e6XTMbofMm+6Vm3zxNQ/tU/nMauu1T8+7rhvP1n/3QjGM5Ddtu7I/DVD42++mdEcswcmh27elQLq70x/17P9z5+6Zouqmd2uaViOuLl7+70+GxGeY4v7a0KfrjOH955uaV3NL4P/2V33L+y/ni4QeLZrE4Hrb7fbnfHvpbdlzGjkU9ozpj0fE8o5Sx42HPbMZiYHpmMnYi6lnMGEw8x0LGTA0zljFIFc+xKmcH1X9OtcSTfy6JCFU/ZSPlqZ+yzKPqp5w4iKd+ymmVUPWbXDoRT/4ml95Uf9xobtTDJbzZq0sBn8v8eN3h+qbZlYfj7rRvSnvZWm4V3YqB4FQIxEAgFYLJI7zVZhGCZSB4FYJjIBgVgs8j1CqAkAcIKoCYB7AqgJQHqFQA+XxWrbHNZ7NKpTafy6o8s/lMJlWpsPlEJlW1s/k8JlXBtvk0NiqN2nwaG1WW2XwaG1WdsO9232n79G/ZdmMzTPNbX+081RVp1w7z1n/9gLllugZM/5/Knyy7Wz1G9am/O82t2PA8HOc/Xzu8LzBuuL9ZGr+uP13aw8+YtN6SftEmVb+vST/MyzGD/phN55bGGT5/S57w+LMS/t5y8Qv+jqdpjUAHhOMhpTkviieo9BAgPdg76CGKoiTdqgH1YYHiiRAoDzUkBy8qD2/NnUQOHioPUa8GD1QHj6yLFxUHr1KZB2qDxbQgKg12jTCOEkLu4eNnPLeKdwsgygFKngQSVNvuIGZ+LagQLYcKpqqC5BVIIC/SFJrAz3uDhSLJe6NIlOAU3InKTPCArp1e1iGw1ypAspacBIKqQgf+OSBhsqsFsURNBkXJ8SAphB5JEaJotaIBhE6
class Truck:
def __init__(self, num_wheels, max_load_per_wheel):
self.num_wheels = num_wheels
self.max_load_per_wheel = max_load_per_wheel
self.cargo = []
def max_load(self):
return self.max_load_per_wheel * self.num_wheels
def describe_cargo(self):
#!/bin/zsh
# Redirect output to stderr.
exec 1>&2
# join_by from https://stackoverflow.com/questions/1527049/how-can-i-join-elements-of-an-array-in-bash
function join_by { local d=$1; shift; echo -n "$1"; shift; printf "%s" "${@/#/$d}"; }
# pattern is just all of these strings smushed into a big regex pattern
booboos=(
@hovissimo
hovissimo / flow.json
Created September 4, 2022 18:45
Node-RED simple modulo router
[
{
"id": "211d2ade5b37281c",
"type": "function",
"z": "0d3a28192a31e0f9",
"name": "mod router",
"func": "const count = context.get('count') ?? 0;\n\nif (count < 5) {\n context.set('count', count + 1);\n return [msg, undefined];\n} else {\n context.set('count', 0);\n return [undefined, msg];\n}",
"outputs": 2,
"noerr": 0,
"initialize": "// Code added here will be run once\n// whenever the node is started.\ncontext.set('count', 0)",
@hovissimo
hovissimo / web_components_demo.js
Last active September 11, 2022 15:30
Web component default slot content
customElements.define('my-span',
class extends HTMLElement {
constructor() {
super();
// '<span><slot>default text</slot></span>'
const span = document.createElement('span')
const slot = document.createElement('slot')
slot.appendChild(document.createTextNode('default text'))
span.appendChild(slot)