Skip to content

Instantly share code, notes, and snippets.

Peter Bengtsson peterbe

Block or report user

Report or block peterbe

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
View titles.json
{
"titles": {
"/docs/Web/CSS/border-block-start-width": "border-block-start-width",
"/docs/Web/HTTP/Proxy_servers_and_tunneling": "Proxy servers and tunneling",
"/docs/Web/API/NonDocumentTypeChildNode": "NonDocumentTypeChildNode",
"/docs/Web/CSS/@media/forced-colors": "forced-colors",
"/docs/Learn/Server-side/Express_Nodejs/forms": "Express Tutorial Part 6: Working with forms",
"/docs/Web/HTTP/Headers/Content-Encoding": "Content-Encoding",
"/docs/Web/CSS/:-moz-handler-disabled": ":-moz-handler-disabled",
"/docs/Web/Reference/Events/TabOpen": "TabOpen",
View default.diff
diff --git a/package-lock.json b/package-lock.json
index 70dad5a97..7356677ba 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7692,771 +7692,6 @@
}
}
},
- "chokidar-cli": {
- "version": "1.2.2",
View default.diff
diff --git a/kuma/javascript/src/article.jsx b/kuma/javascript/src/article.jsx
index 5f6d6d52d..36c5177f3 100644
--- a/kuma/javascript/src/article.jsx
+++ b/kuma/javascript/src/article.jsx
@@ -74,6 +74,8 @@ export default function Article({ document }: DocumentProps) {
const isArchive =
document.slug === 'Archive' || document.slug.startsWith('Archive/');
+ console.log("RENDERING ARTICLE", article);
+
View default.diff
diff --git a/jinja2/includes/login.html b/jinja2/includes/login.html
index ddd57a14f..fb4fa5c85 100644
--- a/jinja2/includes/login.html
+++ b/jinja2/includes/login.html
@@ -1,15 +1,16 @@
<div class="login">
- {% if user.is_authenticated %}
- <a class="user-url" href="{{ user.get_absolute_url() }}">
- <img src="{{ gravatar_url(user.email, size=50) }}" alt="{{ user_display(user) }}" width="50" height="50" class="login-photo avatar" />
- <span class="login-name">{{ user_display(user) }}</span>
View whoami-auth.js
(function() {
'use strict';
// function getWikiAbsoluteURL() {
// // XXX Use your imagination!
// return "http://wiki.mdn.localhost:8000";
// }
function isLoggedIn(whoami, cached) {
View inline.html
<script>window._react_data = JSON.parse("{\"locale\":\"en-US\",\"stringCatalog\":{},\"pluralExpression\":null,\"url\":\"/en-US/docs/Web/HTML\",\"documentData\":{\"wikiURL\":\"http://wiki.mdn.localhost:8000/en-US/docs/Web/HTML\",\"absoluteURL\":\"/en-US/docs/Web/HTML\",\"enSlug\":\"Web/HTML\",\"hrefLang\":\"en\",\"language\":\"English (US)\",\"title\":\"HTML: Hypertext Markup Language\",\"locale\":\"en-US\",\"quickLinksHTML\":\"\\n <ol>\\n <li><a href=\\\"/en-US/docs/Web/HTML\\\"><strong><em>HTML</em></strong></a></li>\\n <li><strong>Tutorials:</strong></li>\\n <li><a href=\\\"/en-US/docs/Learn/Getting_started_with_the_web/HTML_basics\\\">HTML basics</a></li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>Introduction to HTML</summary>\\n <ol>\\n <li><a href=\\\"/en-US/docs/Learn/HTML/Introduction_to_HTML\\\">Introduction to HTML overview</a></li>\\n <li><a href=\\\"/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started\\\">Getting started with HTML</a></li>\\n
View main.7365d324.chunk.pretty.css
@charset "UTF-8";
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
line-height: 1.4;
margin: 20px auto;
padding: 0 10px;
color: #363636;
background: #fff;
text-rendering: optimizeLegibility;
View gist:a0762c4bd9147ec8446d58ffd32301b2
▶ python3 analyze.py
URL: https://www.peterbe.com/specificity_offline/beta/index.html
First Contentful Paint : median: 1.49s (+1.4%) avg: 1.49s (+1.7%)
First CPU Idle : median: 3.12s (+82.6%) avg: 3.08s (+76.6%)
Time to Interactive : median: 3.16s (+61.5%) avg: 3.12s (+61.2%)
Speed Index : median: 2.15s (+23.6%) avg: 2.14s (+24.3%)
URL: https://www.peterbe.com/specificity_offline/beta_inline_css/index.html
First Contentful Paint : median: 1.65s (+12.2%) avg: 1.63s (+11.1%)
First CPU Idle : median: 3.18s (+86.5%) avg: 3.18s (+82.5%)
View cache-misses.py
urls = [
"/en-US/docs/Web/CSS/Specificity",
"/en-US/",
"/en-US/docs/Web/JavaScript",
"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map",
"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach",
"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter",
"/zh-CN/",
"/en-US/docs/Web/API/Fetch_API/Using_Fetch",
View sg_task_completion.py
import random
def show_sg_task_completion(request):
if not request.is_authenticated:
return random.random() <= 0.05
return False
You can’t perform that action at this time.