Skip to content

Instantly share code, notes, and snippets.

View nebularg's full-sized avatar

Kyle Buller nebularg

View GitHub Profile
@nebularg
nebularg / ldoc.ltp
Last active August 22, 2016 22:55
LDoc md template for GitHub (-x md)
> local function format_anchor_link(name)
> -- make an educated guess at what the id of the function header will be
> return name:lower():gsub("%p", ""):gsub("%s", "-")
> end
> local function format_see_link(see)
> if see.href then return see.href end
> return format_anchor_link(see.name)
> end
> local escape = ldoc.escape
> local show_return_and_params = not ldoc.no_return_or_parms
@nebularg
nebularg / snippets.cson
Last active April 17, 2016 10:54
BigWigs snippets for Atom
'.source.lua':
################
# BigWigs stuff
################
# API
'Log':
'prefix': 'bwlog'
-- http://luacheck.readthedocs.io/en/stable/warnings.html
std = "lua51"
max_line_length = false
codes = true
exclude_files = {
"**/Libs",
}
ignore = {
"11./SLASH_.*", -- Setting an undefined (Slash handler) global variable
#!/usr/bin/env python3
import sys
import requests
from bs4 import BeautifulSoup
def parse_page(locale, page):
url = 'http://%s.wowhead.com/%s' % (locale, page)
if locale == 'www':
locale = 'en'
MapID ID Zone Name Area Name
4 1 Kalimdor Durotar
9 1 Kalimdor Mulgore
11 1 Kalimdor Barrens
13 1 Kalimdor Kalimdor
14 0 Eastern Kingdoms Azeroth
16 0 Eastern Kingdoms Arathi
17 0 Eastern Kingdoms Badlands
19 0 Eastern
------------------------------------------------------------------------------
-- DevToolsFrameStack.lua
--
-- Frame stacking monitor
--
-- Globals: DevTools, SLASH_DEVTOOLS_FRAMESTACK1
-- Globals: BINDING_HEADER_DEVTOOLS
-- Globals: BINDING_NAME_DEVTOOLS_FRAMESTACK_*
---------------------------------------------------------------------------
@nebularg
nebularg / send.sh
Last active September 16, 2019 01:36
GitHub Actions Discord webhook
#!/bin/bash
if [ -z "$WEBHOOK_URL" ]; then
echo "ERROR! You need to set the WEBHOOK_URL environment variable."
exit 0
fi
AUTHOR_NAME=$( git -C "$GITHUB_WORKSPACE" log -1 "$GITHUB_SHA" --pretty="%aN" )
COMMITTER_NAME=$( git -C "$GITHUB_WORKSPACE" log -1 "$GITHUB_SHA" --pretty="%cN" )
if [ "$AUTHOR_NAME" = "$COMMITTER_NAME" ]; then
name: Docker Image CI
on:
push
branches:
- master
tags:
- *
paths-ignore:
- README.md
name: Release AddOn
on:
push:
tags:
- '**'
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
local f = CreateFrame("Frame")
f:SetScript("OnEvent", function(self, event)
if Transcriptor:IsLogging() then
Transcriptor:StopLog(event ~= "CHALLENGE_MODE_COMPLETED" and event ~= "PLAYER_ENTERING_WORLD")
end
if event ~= "PLAYER_ENTERING_WORLD" and event ~= "CHALLENGE_MODE_COMPLETED" then
Transcriptor:StartLog(event ~= "CHALLENGE_MODE_START")
end
end)
f:RegisterEvent("PLAYER_ENTERING_WORLD") -- left early