Skip to content

Instantly share code, notes, and snippets.

View populate-search-index-benchmark-sync.js
const fs = require("fs");
const path = require("path");
const fm = require("front-matter");
const {
CONTENT_ROOT,
CONTENT_TRANSLATED_ROOT,
VALID_LOCALES,
} = require("./content");
View populate-search-index-benchmark-graceful-fs.js
const fs = require("graceful-fs");
const path = require("path");
const util = require("util");
const fm = require("front-matter");
const {
CONTENT_ROOT,
CONTENT_TRANSLATED_ROOT,
VALID_LOCALES,
View populate-search-index-benchmark.js
const fs = require("fs");
const path = require("path");
const util = require("util");
const fm = require("front-matter");
const {
CONTENT_ROOT,
CONTENT_TRANSLATED_ROOT,
VALID_LOCALES,
View main.css
code[class*="language-"],
pre[class*="language-"] {
color: #000;
background: none;
text-shadow: 0 1px #fff;
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
View populate-search-index-benchmark.js
const fs = require("fs");
const path = require("path");
const util = require("util");
const fm = require("front-matter");
const {
CONTENT_ROOT,
CONTENT_TRANSLATED_ROOT,
VALID_LOCALES,
View index.md
title slug tags
The MDN project
MDN
Landing
MDN Meta

{{MDNSidebar}}

MDN Web Docs is free-to-use resource on which we document the open web platform. Our mission is to provide developers with the information they need to easily build projects on the web platform.

View default.txt
/en-US/search?q=array 4,368
/en-US/search?q=map 3,091
/en-US/search?q=string 2,676
/en-US/search?q=input 2,531
/en-US/search?q=display 2,070
/en-US/search?q=filter 2,317
/en-US/search?q=slice 2,286
/en-US/search?q=splice 2,233
/en-US/search?q=reduce 2,255
/en-US/search?q=form 2,004
View highlight.py
import sys
import csv
from collections import Counter
csv_file, email = sys.argv[1:]
class color:
PURPLE = "\033[95m"
View default.diff
diff --git a/files/en-us/mdn/index.html b/files/en-us/mdn/index.html
index e006e5247..62d92ecef 100644
--- a/files/en-us/mdn/index.html
+++ b/files/en-us/mdn/index.html
@@ -4,9 +4,8 @@ slug: MDN
tags:
- Landing
- MDN Meta
+sidebar: mdn
---
@peterbe
peterbe / gist:7d5bbcfa0ce330b9934949222b8fdbea
Created Feb 11, 2021
Different memoization techniques in Yari yarn build
View gist:7d5bbcfa0ce330b9934949222b8fdbea
Map 10,000
Built 11,599 pages in 7.6 minutes, at a rate of 25.4 documents per second.
Peak heap memory usage: 2.57 GB
22482 DISTINCT KEYS
34190 COLD HITS
FAILURES: 1.5x