Skip to content

Instantly share code, notes, and snippets.

View JonathanMH's full-sized avatar
🐙

Jonathan M. Hethey JonathanMH

🐙
View GitHub Profile
@JonathanMH
JonathanMH / explainy-boi.lua
Last active December 3, 2023 13:09
tmp wa
-- fake functions
function GetInstanceInfo()
return '', 'raid', 1, '', '', '', '', '', ''
end
function GetDifficultyInfo(fakeArg1)
return '', '', true, '', true, '', ''
end
-- usually provided by wow API
@JonathanMH
JonathanMH / 2022-12-01.toml
Created December 2, 2022 09:07
Go mastodon bot
text = "The official Twitter account for Fall Guys released a \"human for scale\" illustration featuring their playable characters. Fall Guys are all 183cm (6ft) by the way."
tags = ['FallGuys']
assets = ['fallguys-scale.jpeg', 'fallguys-eyes.png']
# alt texts for images
assetsAlts = ['A Fall Guy next to human', 'Fall Guy eyes and skull']
credits = ['https://www.artstation.com/tudormorris']
@JonathanMH
JonathanMH / tampermonkey-userscript.js
Created September 9, 2022 15:21
Tampermonkey tarkov wiki fixer
// ==UserScript==
// @name Tarkov Wiki fixer
// @namespace https://escapefromtarkov.fandom.com
// @version 0.1
// @description Remove bullshit elements that nobody needs in the fandom wiki
// @author JonathanMH
// @match https://escapefromtarkov.fandom.com/*
// @grant none
// ==/UserScript==
/run SendChatMessage(GetRandomArgument("Bombidum..","Hop along, my hearties!","Wake now my merry lads!","Merry dol! Derry dol! My darling!", "Tom Bom, jolly Tom, Tom Bombadillo!"),"SAY")
net stop w32time
net start w32time
w32tm /resync /nowait
# $trigger = New-JobTrigger -AtStartup -RandomDelay 00:00:30
# Register-ScheduledJob -Trigger $trigger -FilePath C:\Users\jonat\ntp-trigger.ps1 -Name StartupTriggerNTP
@JonathanMH
JonathanMH / mdclip.go
Created May 3, 2017 10:25
Golang script for compiling markdown to HTML and copying to the clipboard
package main
import (
"log"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"runtime"
@JonathanMH
JonathanMH / index.js
Created October 22, 2016 15:07
JSON Web Token Tutorial: Express
// file: index.js
var _ = require("lodash");
var express = require("express");
var bodyParser = require("body-parser");
var jwt = require('jsonwebtoken');
var passport = require("passport");
var passportJWT = require("passport-jwt");
@JonathanMH
JonathanMH / employee.csv
Last active January 15, 2016 11:25
newline problem with node-csv-parse
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 5 columns, instead of 6. in line 1.
Name,Gender,"preferred language",startDate,endDate
Barbara McFinley,Female,JavaScript,2015-13-01,,
@JonathanMH
JonathanMH / crawl.js
Created December 14, 2015 10:20
crawl a page a bunch of times
var fs = require('fs');
var async = require('async');
var request = require('request');
var cheerio = require('cheerio');
var _ = require('lodash');
var url = 'http://programmingexcuses.com';
var excuses = [];
@JonathanMH
JonathanMH / get-xml.js
Created November 8, 2015 23:12
XML parsing and filtering
var request = require('request');
var async = require('async');
var xml2js = require('xml2js');
var parseString = require('xml2js').parseString;
var parser = new xml2js.Parser(
{
preserveChildrenOrder: true,
explicitArray: false,
charkey: "content",