Skip to content

Instantly share code, notes, and snippets.

mcpower /
Last active December 7, 2023 12:23
Tips for getting on the Advent of Code leaderboard

Hi, I'm mcpower. I've done Advent of Code seriously for two years now in Python, placing 9th in 2018 and 12th in 2017. This year, I'm taking a break from aiming for the leaderboard - while it's fun and all, it is a bit stressful at times (the good kind of stress, though!). As such, I'd like to share a few tips for anyone wanting to aim for the leaderboard.

This is everything that worked for me. Your mileage may vary, though - don't take this as gospel, see what works for you.

Go fast

Go fast.


Keybase proof

I hereby claim:

  • I am mcpower on github.
  • I am mcpower ( on keybase.
  • I have a public key ASAP9e2zkiWgreVGbhxKp_i0PWAi0Tn1lqS6B__Dbpzlfgo

To claim this, I am signing this object:

mcpower / !
Created March 28, 2019 12:40 — forked from mossbanay/
View !


The rules of the game are as follows:

  • We play a total of N_GAMES times
  • In each game, there are N_TOSSES made
  • You can choose to bet on any of those tosses
  • You are given the odds (which are constant for each game) before starting
  • You are given your starting money before starting
  • Each game a new probability of the coin landing heads is chosen from some distribution within [0, 1] (see
  • The probability is constant for each game
mcpower / aoc-2018.css
Last active November 28, 2019 21:28 — forked from lynn/aoc-2018.css
My user stylesheet for Advent of Code
View aoc-2018.css
/* Sans-serif for most content. */
body { font-family: "Ubuntu", "Segoe UI", sans-serif; line-height: 1.3em; }
input~span:before, .leaderboard-entry, .privboard-row { font-family: "Source Code Pro", monospace; letter-spacing: -1px; }
/* Emphasis = bold, instead of glowy. */
body * { text-shadow: none !important; }
article em { font-weight: bold; }
/* Center content. */
main>article, main>p, pre.calendar, pre.stats, form, .leaderboard-entry, header { width: 40em !important; margin-left: auto; margin-right: auto; }
View gapps-config.txt
mcpower / dynasty_preloader.user.js
Last active January 9, 2017 12:05
Dynasty Preloader
View dynasty_preloader.user.js
// ==UserScript==
// @name Dynasty Preloader
// @namespace
// @version
// @description Preloads Dynasty Reader pages.
// @author mcpower
// @match*
// @grant none
// @license GPLv3
// ==/UserScript==
View extractwifi.patch
diff -ur old/extractwifi.c new/extractwifi.c
--- old/extractwifi.c 2016-12-29 23:04:40.000000000 +1100
+++ new/extractwifi.c 2016-12-30 16:00:29.106186400 +1100
@@ -51,7 +51,7 @@
int main(int argc, char** argv) {
if(argc<2) {
- printf("./extractwifi filename\n");
+ printf("./extractwifi filename [offset=b730]\n");
return -1;
mcpower / fix.ps1
Created October 2, 2016 09:42
Fixing broken Windows 10 apps
View fix.ps1
Add-AppxPackage -DisableDevelopmentMode "$env:windir\systemapps\ContactSupport_cw5n1h2txyewy\appxmanifest.xml" -Register
Add-AppxPackage -DisableDevelopmentMode "$env:windir\systemapps\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\appxmanifest.xml" -Register
Add-AppxPackage -DisableDevelopmentMode "$env:windir\systemapps\Microsoft.AccountsControl_cw5n1h2txyewy\appxmanifest.xml" -Register
Add-AppxPackage -DisableDevelopmentMode "$env:windir\systemapps\Microsoft.BioEnrollment_cw5n1h2txyewy\appxmanifest.xml" -Register
Add-AppxPackage -DisableDevelopmentMode "$env:windir\systemapps\Microsoft.LockApp_cw5n1h2txyewy\appxmanifest.xml" -Register
Add-AppxPackage -DisableDevelopmentMode "$env:windir\systemapps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\appxmanifest.xml" -Register
Add-AppxPackage -DisableDevelopmentMode "$env:windir\systemapps\Microsoft.PPIProjection_cw5n1h2txyewy\appxmanifest.xml" -Register
Add-AppxPackage -DisableDevelopmentMode "$env:windir\systemapps\Microsoft.Windows.AppRep.ChxApp_cw5n1h2txyewy\appxmanifest.x
mcpower / osugame_func+.user.js
Created March 15, 2016 00:12
Userscript for /r/osugame
View osugame_func+.user.js
// ==UserScript==
// @name osugame_func+
// @namespace /r/osugame
// @author /u/N3G4
// @description Adds osu! related functionality to /r/osugame
// @include **
// @version 1.2.2
// @run-at document-end
// @grant GM_xmlhttpRequest
// ==/UserScript==
View emoji.ahk
#Hotstring EndChars :
#Hotstring O ?