Skip to content

Instantly share code, notes, and snippets.

Gerard erorus

Block or report user

Report or block erorus

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
erorus / mount-json-transform.php
Created Jan 15, 2019
Enhanced Mount Master List generation
View mount-json-transform.php
require_once __DIR__ . '/vendor/autoload.php';
use Erorus\DB2\Reader;
$o = json_decode(file_get_contents(__DIR__ . '/mounts.json'), true);
if (json_last_error() != JSON_ERROR_NONE) {
fwrite(STDERR, "JSON error loading mounts.json: " . json_last_error_msg() . "\n");
erorus /
Last active Mar 6, 2019
Mashery -> Blizzard API Migration

Mashery -> Blizzard API Migration

This is intended for developers who are currently using the API via Mashery, and need to migrate to Blizzard's own API.

The official migration documentation is here but it's wordy and scattered. This document intends to cut the BS for existing developers as a true migration guide.

It's organized into sections based on the different kinds of API calls.

Game Note

This was written with World of Warcraft APIs in mind. While our hostnames are changing, none of WoW's API paths will change. However, some Starcraft II paths will change, so please reference Blizzard's documentation for further information about that.

erorus / split.php
Created Apr 18, 2018
Split blocks of video transcript into paragraphs
View split.php
/* quick and dirty paragraph splitter
* by Erorus
* this script is fully in the public domain, do what you want with it
* intended for use for unformatted video transcripts
* such as ones produced by Ars Technica, e.g.
erorus / titles.csv
Created Apr 7, 2018
WoW character titles
View titles.csv
1 Private %s Private %s 1 0
2 Corporal %s Corporal %s 2 0
3 Sergeant %s Sergeant %s 3 0
4 Master Sergeant %s Master Sergeant %s 4 0
5 Sergeant Major %s Sergeant Major %s 5 0
6 Knight %s Knight %s 6 0
7 Knight-Lieutenant %s Knight-Lieutenant %s 7 0
8 Knight-Captain %s Knight-Captain %s 8 0
9 Knight-Champion %s Knight-Champion %s 9 0
10 Lieutenant Commander %s Lieutenant Commander %s 10 0
View wowhead-hide-beta-news.user.js
// ==UserScript==
// @name Wowhead Hide Beta News
// @version 1
// @include http://*
// @include https://*
// @grant GM_addStyle
// ==/UserScript==
erorus / pets.json
Last active Aug 24, 2018
Enhanced Pet Master List
View pets.json
This file has been truncated, but you can view the full file.
"pets": [
"canBattle": true,
"canObtain": true,
"canTrade": true,
"creatureId": 17254,
"description": "One of Ash'alah's litter, entrusted to you by the Dreamweavers.",
"displayId": 37949,
erorus / mounts.json
Last active Jan 28, 2019
Enhanced Mount Master List
View mounts.json
"mounts": [
"name": "Abyss Worm",
"spellId": 232519,
"creatureId": -74315,
"itemId": 143643,
"qualityId": 4,
"icon": "inv_serpentmount_green",
"isGround": true,
erorus / stale.php
Created Dec 11, 2017
script to close stuck-open electrumx server connections
View stale.php
echo "Starting.. ", date('Y-m-d H:i:s'), "\n";
$conns = [];
$lsof = `lsof -n -a -c electrumx -itcp -sTCP:ESTABLISHED -Ffn`;
$tok = strtok($lsof, "\n");
$pid = 0;
erorus / banners.txt
Last active Jul 3, 2018
Electrum Server Banners for BTC
View banners.txt
Welcome to Electrum!
Welcome to Electrum!
Welcome to yet another ElectrumX full server!
erorus /
Last active Jan 14, 2019
Global Market Price calc from The Undermine Journal for Wowhead

Global Buyout Price Calculation

for Wowhead, via The Undermine Journal


  • "Market Price": The cost, per each, to buy the cheapest 15% of the total available quantity of a given item at one instant in time on one realm.
  • "Current Price": The market price at the most recent data snapshot.
  • "Mean Price": A mathematical mean (or "average") of market prices. Sum up all the prices, divide by the count of prices. Simple. This could use the prices of one item on one realm over time, or the current prices of one item across all realms in a region.
  • "Median Price": The midpoint of a sorted list of "market prices". This could use the prices of one item on one realm over time, or the current prices of one item across all realms in a region.
  • "Global Price": The average value of the US and EU region median prices, as observed 8 times across the past 24 hours.
You can’t perform that action at this time.