Skip to content

Instantly share code, notes, and snippets.

View jmerle's full-sized avatar

Jasper van Merle jmerle

View GitHub Profile
@jmerle
jmerle / HETools_Helper_Script.js
Last active July 9, 2016 14:10
HETools Helper Script
/* Variables */
var gritterLoaded = false;
var footer = document.getElementsByClassName("pagination alternate")[0];
var liTags = footer.getElementsByTagName("li");
var numberOfPages = parseInt(liTags[liTags.length - 2].innerText);
var currentWebsiteURL = window.location.protocol + "//" + window.location.hostname;
var savedDatabase = document.getElementById("list").innerHTML;
/* Functions */
function gritterNotify(opts) {
@jmerle
jmerle / HETools_Helper_Install.user.js
Last active July 9, 2016 14:11
HETools Helper Install
// ==UserScript==
// @name HETools Helper
// @version 1.0.0
// @description A small script that enables you to sync your Hacker Experience HDB with HETools
// @author Jasper van Merle (Jasperr)
// @match https://*.hackerexperience.com/list*
// ==/UserScript==
$.getScript("https://cdn.rawgit.com/JvanMerle/60bd611423bc518426c3a8cf690a33e5/raw/090b55bc333587c7af2751318e4c4020659bce2e/HETools_Helper_Script.js");
@jmerle
jmerle / HE_IP_Checker.user.js
Last active August 28, 2016 11:36
HE IP Checker is a little userscript that checks IP addresses for their types and if they exist. You can do a maximum of 2,500 IP's at once (to prevent IP brute-forcing). It injects into the breadcrumb bar, and the input window opens when you click the link the 'Check IP's' link just beneath where your bank money is shown.
// ==UserScript==
// @name HE IP Checker
// @namespace http://tampermonkey.net/
// @version 1.0.0
// @description HE IP Checker is a little userscript that checks IP addresses for their types and if they exist. You can do a maximum of 2,500 IP's at once (to prevent IP brute-forcing). It injects into the breadcrumb bar, and the input window opens when you click the link the 'Check IP's' link just beneath where your bank money is shown.
// @author Jasper van Merle
// @match https://*.hackerexperience.com/*
// @grant none
// @require https://code.jquery.com/jquery-3.1.0.min.js
// @require https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js
@jmerle
jmerle / hackman.js
Created February 23, 2017 16:30
A little Hack Man run script for Windows
const fs = require('fs');
const spawn = require('child_process').spawn;
if (process.argv.length !== 3) throw new Error('Usage: node app.js <wrapper-commands file>');
var runMatch = function(wrapperCommandsFile) {
return new Promise(function(resolve, reject) {
fs.readFile(wrapperCommandsFile, 'utf8', function(error, data) {
if (error) reject(error);
@jmerle
jmerle / edabit-toolbox.user.js
Created March 19, 2017 14:08
Adds some functionality to Edabit.
// ==UserScript==
// @name Edabit Toolbox
// @namespace EdabitToolbox
// @version 1.0.0
// @description Adds some functionality to Edabit.
// @author Jasperr
// @match https://edabit.com/*
// @grant none
// ==/UserScript==
@jmerle
jmerle / gitkraken-tree-screenshot.js
Created February 24, 2019 13:07
Export the GitKraken tree to a png image
/**
* Save the visible part of the GitKraken tree to a png file.
*
* Instructions:
* 1. Start GitKraken with the `--remote-debugging-port=9222` argument and wait for the tree to show
* 2. Open Chrome and go to `http://localhost:9222/`
* 3. Click on the GitKraken link and go to the Console tab
* 4. Copy-paste the script down below and wait until it logs the image file path
* 5. Reload GitKraken (Ctrl+R) because the script messes up the view in order to create a neat screenshot
*
@jmerle
jmerle / petstore.json
Created May 15, 2019 22:25 — forked from danielflower/petstore.json
PetStore Open API v3
{
"openapi": "3.0.0",
"servers": [
{
"url": "https://petstore.swagger.io/v2",
"description": "Primary server"
},
{
"url": "http://petstore.swagger.io/v2",
"description": "Secondary server"
@jmerle
jmerle / devdocs-explanation.md
Created July 18, 2019 00:26
An explanation of the basics of what happens when you scrape a documentation in DevDocs

When you start scraping documentation using thor docs:generate <doc>, Thor will call Docs.generate. This method finds the correct scraper and calls Doc.store_pages, which is the basis of the actual scraping.

This method sets up an EntryIndex in which entries are stored and a PageDb in which processed pages are stored. After that's done, it starts scraping by calling build_pages on the scraper. For most scrapers this means the Scraper.build_pages method is called, but the Browser Support Tables and in the future the .NET scraper (which I am currently working on) implement the build_pages method themselves.

The

@jmerle
jmerle / keybase.md
Created July 20, 2019 19:26
keybase.md

Keybase proof

I hereby claim:

  • I am jmerle on github.
  • I am jmerle (https://keybase.io/jmerle) on keybase.
  • I have a public key ASCM5JeyxS15PJEkt7NqAjAx9RTCc-988oDoX_RBz7U6Fwo

To claim this, I am signing this object:

@jmerle
jmerle / redirects.js
Created August 5, 2019 14:50
Parsing the Markdown files in https://github.com/docker/docker.github.io to extract the redirect_from url's for use in DevDocs
const fs = require('fs');
const path = require('path');
const fg = require('fast-glob');
const fm = require('front-matter');
(async () => {
const files = await fg('**/*.md');
const redirects = {};