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 / create-conflict.sh
Created June 24, 2015 09:05
Create a merge conflict in git
#!/bin/bash
mkdir git-repo
cd git-repo
git init
touch my_code.sh
git add my_code.sh
echo "echo Hello" > my_code.sh
git commit -am 'initial'
git checkout -b new_branch
echo "echo \"Hello World\"" > my_code.sh
@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==
@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");
/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
<?php
/**
** A base module for [text], [text*], [email], and [email*]
**/
/* Shortcode handler */
wpcf7_add_shortcode( 'text', 'wpcf7_text_shortcode_handler', true );
wpcf7_add_shortcode( 'text*', 'wpcf7_text_shortcode_handler', true );
wpcf7_add_shortcode( 'email', 'wpcf7_text_shortcode_handler', true );
@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 / 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,,