Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rjackson on github.
  • I am rjackson (https://keybase.io/rjackson) on keybase.
  • I have a public key whose fingerprint is 4939 AAF3 D453 A6CD 549B FFCA E1A3 BFE9 D187 72BC

To claim this, I am signing this object:

@rjackson
rjackson / a_darkmode.md
Last active October 3, 2020 15:41
Dark mode via mediawiki Custom CSS and Custom JS

RJ doesn't want to run some random internet bloke's "experimental" extension on our very important wiki, because he's a grumpy old man

The custom css below is taken from wikimedia/mediawiki-extensions-DarkMode/resources/ext.DarkMode.less, and has been converted to regular CSS via https://jsonformatter.org/less-to-css

The Javascript is from wikimedia/mediawiki-extensions-DarkMode/resources/ext.DarkMode.js, with a slight modification to add the link to toggle dark mode through Javascript. The extension does it via MediaWiki hooks, which y'all cant do yourselves

  1. Log into wiki
  2. Click "Preferences"
  3. Click onto the "Appearance" tab
  4. Click "Custom CSS", edit that page and add the code below
@rjackson
rjackson / makedo.py
Created September 28, 2014 20:31
ezkatka
Getting owned video games for 76561197989222171
Found 478 video games!
70 | Half-Life | 96
220 | Half-Life 2 | 96
620 | Portal 2 | 95
72850 | The Elder Scrolls V: Skyrim | 94
12110 | Grand Theft Auto: Vice City | 94
12120 | Grand Theft Auto: San Andreas | 93
12100 | Grand Theft Auto III | 93
4560 | Company of Heroes | 93
@rjackson
rjackson / test.php
Created September 3, 2014 19:13
Updated PHP VDF code to support arrays of maps.
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
$test_data = <<<TEST_DATA
"treasure_chest_59_trappers_pelt"
{
"Crescent" "1"
This file has been truncated, but you can view the full file.
Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> DIRTY_DATA = "&"
>>> while "&" in DIRTY_DATA:
DIRTY_DATA = DIRTY_DATA.replace('&', '&amp;')
print(DIRTY_DATA)
&amp;
&amp;amp;

Keybase proof

I hereby claim:

  • I am rjacksonm1 on github.
  • I am rjackson (https://keybase.io/rjackson) on keybase.
  • I have a public key whose fingerprint is 4939 AAF3 D453 A6CD 549B FFCA E1A3 BFE9 D187 72BC

To claim this, I am signing this object:

@rjackson
rjackson / config.js
Last active December 29, 2015 20:48
mmstats_updater
// Configure and mv to config.js
var config = {};
config.steam_name = "";
config.steam_user = "";
config.steam_pass = "";
config.steam_guard_code = "";
config.mm_stats_check_interval = 1 * 60 * 1000;
@rjackson
rjackson / EtiennePls.js
Created November 9, 2013 20:41
jQuery is my crutch. How do I html without it?
// ==UserScript==
// @version 0.1
// @name EttiennePls
// @description Lagg wanted this, so I made it.
// @homepage http://rjackson.me
// @match http://perot.me/*
// @match https://perot.me/*
// ==/UserScript==
// a function that loads jQuery and calls a callback function when jQuery has finished loading