Skip to content

Instantly share code, notes, and snippets.

View default.txt
-- explain auth_permission;
select * from auth_permission where name like '%revert%' and name like '%revision%';
View peterbe__test-http-links.py
View default.txt
DIFFERENT! bcd:javascript.builtins.Promise
DIFFERENT! bcd:api.AbortController
DIFFERENT! bcd:api.AbortSignal
DIFFERENT! bcd:api.AbsoluteOrientationSensor
DIFFERENT! bcd:api.AbstractRange
DIFFERENT! bcd:api.AbstractWorker
DIFFERENT! bcd:api.Accelerometer
DIFFERENT! bcd:api.AmbientLightSensor
DIFFERENT! bcd:api.AnalyserNode
DIFFERENT! bcd:api.Animation
View index.json
{"doc":{"isTranslated":false,"isActive":true,"flaws":{"macros":[{"id":"macro0","fixable":true,"suggestion":"{{domxref(\"WebGL_API.Types\")}}","explanation":"/en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types","name":"MacroRedirectedLinkError","error":{},"errorStack":"Error: /en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types\n at Object.recordNonFatalError (/Users/peterbe/dev/MOZILLA/MDN/yari/kumascript/src/render.js:115:19)\n at Object.smartLink (/Users/peterbe/dev/MOZILLA/MDN/yari/kumascript/src/api/web.js:62:27)\n at eval (eval at compile (/Users/peterbe/dev/MOZILLA/MDN/yari/node_modules/ejs/lib/ejs.js:662:12), <anonymous>:60:18)\n at DOMxRef (/Users/peterbe/dev/MOZILLA/MDN/yari/node_modules/ejs/lib/ejs.js:692:17)\n at /Users/peterbe/dev/MOZILLA/MDN/yari/node_modules/ejs/lib/ejs.js:258:40\n at new Promise (<anonymous>)\n at tryHandleCache (/Users/peterbe/dev/MOZILLA/MDN/yari/node_modules/ejs/lib/ejs.js:256:14)\n at Object.exports.rend
View checked.json
{
"domains": {
"www.techopedia.com": true,
"blog.artillery.com": false,
"www.beloola.com": false,
"playcanv.as": true,
"hexgl.bkcore.com": true,
"beta.unity3d.com": true,
"unity3d.com": true,
"sandbox.photonstorm.com": false,
View peterbe__resort_wikihistory.js
const fs = require("fs");
const all = JSON.parse(fs.readFileSync("files/en-us/_wikihistory.json"));
const sorted = Object.fromEntries(
Object.keys(all)
.sort()
.map((key) => {
return [key, all[key]];
})
);
View default.txt
11610,11618d11609
< "Learn/Performance/Perceived_performance": {
< "modified": "2020-07-16T22:40:43.307Z",
< "contributors": [
< "wilsotobianco",
< "estelle",
< "mhilko",
< "ottoetc"
< ]
< },
View peterbe__test_findall.js
const { Document } = require("./content");
function f1(options) {
let count = 0;
for (const filePath of Document.findAll0(options).iter({ pathOnly: true })) {
count += 1;
}
return count;
}
function f2(options) {
View dummy.js
const { Document } = require("@mdn/yari/content");
console.log(Document.findByURL("/#readEntries()"));
View peterbe__fix_specname_linebreaks.py
import re
from pathlib import Path
def replacer(match):
return f"'{match.groups()[0]} "
FIXES = 0
for file in Path('files/en-us/web/api').rglob('index.html'):
lines = []
with open(file) as f: