Skip to content

Instantly share code, notes, and snippets.

Bashing the rocks together...

Dave Vandyke kzar

Bashing the rocks together...
Block or report user

Report or block kzar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kzar / trac-spam-comments.json
Last active Oct 8, 2019
Spam comments on grouped by user
View trac-spam-comments.json
"sheweed168": [
"impulsepp": [
kzar /
Created Sep 12, 2019
Old issue tracker module to new issue tracker(s) table
kzar / edgeIDBtest.js
Created Jan 23, 2019
Edge extension IndexedDB test (7223)
View edgeIDBtest.js
function openDB(dbName)
let req =;
req.onsuccess = event =>
console.log("version::", event.currentTarget.result.version);
console.log("store names::", JSON.stringify(event.currentTarget.result.objectStoreNames));
kzar / gist:56e211fc7096f07cd75ac4f2f960f6ed
Last active Jan 15, 2019
Edge showOptions debugging
View gist:56e211fc7096f07cd75ac4f2f960f6ed
// First these two lines
let manifest = browser.runtime.getManifest();
browser.extension.getURL(manifest.options_page ||;
// Then this one
browser.tabs.query({}, tabs => { console.log(JSON.stringify(tabs)); })
// Then this
kzar /
Created Sep 28, 2017
Shared default parameter value Python example
import random
def foo(b={}):
b[random.random()] = "bar"
print b
for i in range(10):
print "Iteration " + str(i + 1)
kzar / abp-crowdin-fix.diff
Created Sep 25, 2017
Adblock Plus Crowdin integration fix
View abp-crowdin-fix.diff
diff --git a/ b/
index 140f22c..f80a187 100644
--- a/
+++ b/
@@ -299,7 +299,7 @@ def setupTranslations(localeConfig, projectName, key):
allowed = set()
allowedLocales = json.load(urllib2.urlopen(
- ))
+ ))['data']
kzar / adblockplusui-critical-dependency.patch
Created Sep 22, 2017
adblockplusui critical dependency webpack fix
View adblockplusui-critical-dependency.patch
diff --git a/messageResponder.js b/messageResponder.js
index 65e91ea..7ed00c7 100644
--- a/messageResponder.js
+++ b/messageResponder.js
@@ -21,8 +21,6 @@
- let ext = global.ext || require("ext_background");
kzar / log-blob.js
Last active Mar 22, 2017
Log chrome webRequest and webNavigation events for blob URLs
View log-blob.js
function logEvent(type, details)
if (details.url.startsWith("blob"))
console.log(type, details);
/* WebNavigation */
chrome.webNavigation.onBeforeNavigate.addListener(details =>
logEvent("onBeforeNavigate", details);
kzar / strip.js
Last active Sep 15, 2016
Small Node.js script to strip document blocking rules. (See )
View strip.js
"use strict";
let fs = require("fs");
if (process.argv.length != 3)
console.log("Usage: nodejs strip.js filename.json");
let filename = process.argv[2];
kzar / safari-27656882.txt
Created Aug 2, 2016
Safari bug 27656882 - Safari Content Blocking API breaking Safari's URL parser
View safari-27656882.txt
We have found a serious bug whereby a content blocking rule list with a certain rule can stop Safari from being able to parse certain URLs. Specifically we found this to happen for Google text ad links which are supposed to redirect to the advertisement. Instead of the browser being redirected, Safari displays an error (see screenshot). This error goes away when the content blocking API is not used, and when it is used without certain troublesome rules.
Steps to Reproduce:
1. Create a new empty Safari Extension.
2. Create a file called rules.json containing the following:
"trigger": {
You can’t perform that action at this time.