- phpQuery
- Medoo
NB: db.php
is just a wrapper for Medoo that reads $dbPath
and returns a corresponding Medoo instance.
#!/usr/bin/env python | |
from argparse import ArgumentParser | |
from itertools import chain | |
import os | |
import subprocess | |
try: | |
import urllib.request as urllib | |
except ImportError: | |
import urllib |
var ajaxReqs = 0; | |
var ajaxQueue = []; | |
var ajaxActive = 0; | |
var ajaxMaxConc = 3; | |
function addAjax(obj) { | |
ajaxReqs++; | |
var oldSuccess = obj.success; | |
var oldError = obj.error; | |
var callback = function() { | |
ajaxReqs--; |
function val2key(vals) | |
keys = {} | |
for i, key in ipairs(vals) do keys[key] = true end | |
return keys | |
end | |
local modmgr = {} | |
modmgr.__index = modmgr | |
setmetatable(modmgr, { |
# 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 |
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 |
<?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 |
// 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"; |
// ==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== |
// ==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* |