I hereby claim:
- I am OllieTerrance on github.
- I am terrance (https://keybase.io/terrance) on keybase.
- I have a public key whose fingerprint is A78E 9C1E 9514 4560 7BF0 77C8 645A 86C9 6168 F957
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env sh | |
| NEWROOT=0 | |
| GENROOTKEY=0 | |
| NEWCERT=0 | |
| GENCERTKEY=0 | |
| DAYS=3653 | |
| PFX=0 | |
| MERGE=0 |
| <? | |
| class Debug { | |
| const log = 0; | |
| const success = 1; | |
| const warning = 2; | |
| const error = 3; | |
| private static $init = false; | |
| public static function start() { | |
| session_start(); | |
| if (!$_SESSION["debug"]) { |
| <? | |
| include "Debug.php"; | |
| class DB { | |
| private static $conn = null; | |
| private static $prefix = ""; | |
| public static function connect($host="localhost", $user="root", $pass=null, $db=null) { | |
| DB::$conn = mysqli_connect($host, $user, $pass, $db); | |
| } | |
| public static function setPrefix($newPrefix="") { | |
| DB::$prefix = ($newPrefix ? $newPrefix : ""); |
| // ==UserScript== | |
| // @id iitc-plugin-listexport@OllieTerrance | |
| // @name IITC plugin: Portal List Exporter | |
| // @category Info | |
| // @version 0.0.0.1 | |
| // @namespace https://github.com/jonatkins/ingress-intel-total-conversion | |
| // @description Exports a CSV list of all or enemy portals. | |
| // @include https://www.ingress.com/intel* | |
| // @include http://www.ingress.com/intel* | |
| // @match https://www.ingress.com/intel* |
| // ==UserScript== | |
| // @name Google Play Testing per-account | |
| // @namespace http://terrance.uk.to | |
| // @version 0.1 | |
| // @description Makes the "Become a Tester" button respect the current auth user. | |
| // @author Ollie Terrance | |
| // @match https://play.google.com/apps/testing/* | |
| // @grant none | |
| // ==/UserScript== |
| // Mode to find, and mode to switch to, as shown in the privacy dropdown. | |
| var from = "Public", to = "Friends"; | |
| // Gather all posts on the old mode. | |
| var posts = $$('a[aria-label="' + from + '"]'); | |
| // Assuming running from the console, copy the $$ selector method. | |
| window.$$_ = $$; | |
| // Facebook overrides setTimeout, so need to obtain one from elsewhere. | |
| // Don't destroy the frame, otherwise it'll stop working. | |
| var f = document.createElement("iframe"); | |
| f.style.display = "none"; |
| <?php | |
| /* | |
| The keystore is a map from keys to values, but nested arrays allow sub-key organisation. | |
| This means an array cannot be retrieved as a value, only its (scalar) contents. | |
| */ | |
| $keystore = array( | |
| "key" => "valueA", | |
| "group" => array( | |
| "subkey1" => 42, | |
| "subkey2" => true |
| from functools import wraps | |
| from inspect import getargspec | |
| def cacheResult(fn): | |
| cacheAttr = "{0}Cache".format(fn.__name__) | |
| argSpec = getargspec(fn) | |
| argNames = argSpec.args[1:] | |
| if len(argNames) > 1: | |
| raise RuntimeError("can't cache results if function takes multiple args") | |
| argName = argNames[0] if len(argNames) else None |
| # Card Viewer 1.3: a small plugin to show cards without reviewing. | |
| # This plugin will export cards to HTML, and open them in your browser. | |
| # Select a card, then go to Edit > View Card, select View from the toolbar, or press Ctrl+Return. | |
| from aqt.browser import BrowserToolbar | |
| from aqt import mw | |
| from aqt.qt import * | |
| from aqt.utils import shortcut, showInfo | |
| from anki.find import fieldNames |