Skip to content

Instantly share code, notes, and snippets.

View withinboredom's full-sized avatar
🏠
Working from home

Rob Landers withinboredom

🏠
Working from home
View GitHub Profile
// ==UserScript==
// @name Purchaser
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.mediamarkt.nl/*
// @match https://www.computop-paygate.com/*
// @icon https://www.google.com/s2/favicons?domain=mediamarkt.nl
// @grant GM_setValue
The only google result with this string:
ccccccjttbrdcdvunrkcrceggkdeengbkcguguggluek

Keybase proof

I hereby claim:

  • I am withinboredom on github.
  • I am withinboredom (https://keybase.io/withinboredom) on keybase.
  • I have a public key ASA7Hof5cICohsBwRsp8WQINhYJlRoRWFoK_Ua6tIdO73Qo

To claim this, I am signing this object:

@withinboredom
withinboredom / better_phab.js
Created March 30, 2018 00:43
A better phabricator
// ==UserScript==
// @name A better phabricator
// @namespace http://tampermonkey.net/
// @version 0.1
// @description shows how to use babel compiler
// @author You
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.js
// @require https://code.jquery.com/jquery-3.3.1.min.js
// @match https://code.a8c.com/*
@withinboredom
withinboredom / really_is.php
Created October 31, 2017 19:49
What a for loop really is
<?php
for($a = 0; $a < 5; $a = $a + 1) {
echo $a;
}
{
$a = 0;
while($a < 5) {
{
echo $a;
@withinboredom
withinboredom / LiveActor.js
Last active October 25, 2017 01:39
Event Sourcing
class User extends LiveActor {
constructor( id, injectionContainer ) {
super( id, injectionContainer );
// set initial state for all users
this._state[ 'logged_in' ] = false;
}
/**
* Login a user
@withinboredom
withinboredom / response.json
Created October 25, 2017 01:35
API Response
{
"output": [
"Step 1/11 : FROM withinboredom/scalable-wordpress:4.7.3-apache\n",
null,
null,
"***SNIP***",
" :: Layer already exists",
" :: Layer already exists",
@withinboredom
withinboredom / request.json
Created October 25, 2017 01:34
API Request
{
"username": "withinboredom",
"password": "***",
"email": "***",
"repo": "withinboredom/wordpress",
"plugins": [
{
"type": "wporg",
"slug": "jetpack",
"version": "latest"
@withinboredom
withinboredom / using_hooks.cs
Last active October 23, 2017 16:08
Using WordPress#
using WordPress.Includes;
namespace Example {
class ExampleClass {
public ExampleClass( WpHookManager hooks ) {
hooks.AddAction( "example", Callback, priority: 10, acceptedArgs: 0 );
}
private async Task<object> Callback(IEnumerable<object> args) {
return true;
#!/bin/bash
# Slack API token
token="YOUR_TOKEN_HERE"
postMessageUrl="https://slack.com/api/chat.postMessage"
defaultChannel="#SOME_DEFAULT_CHANNEL"
# Was last time "Yesterday"?
echo "Yesterday? Or some other day? (Empty for yesterday)"
read lastTime