Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Bengtsson peterbe

View GitHub Profile
View docker-compose.override.yml
version: "2.1"
services:
web:
command: ./manage.py runserver 0.0.0.0:8000
stdin_open: true
tty: true
View default.txt
content/files/en-us get-rid-of-mdnmozillademosorg-files-part-5 ✔
▶ rg mdn.mozillademos.org --count-matches
games/techniques/crisp_pixel_art_look/index.html:1
web/media/formats/video_codecs/index.html:6
web/javascript/reference/statements/debugger/index.html:1
web/api/canvasrenderingcontext2d/imagesmoothingquality/index.html:1
web/api/canvasrenderingcontext2d/filter/index.html:1
web/api/canvasrenderingcontext2d/strokestyle/index.html:1
web/api/canvasrenderingcontext2d/createpattern/index.html:1
web/api/canvasrenderingcontext2d/drawimage/index.html:2
View after.html
<div class="header-search">
<form
action="/en-US/search"
class="search-widget"
role="search"
aria-haspopup="listbox"
aria-owns="downshift-0-menu"
aria-expanded="false"
id="nav-main-search"
>
View peterbe__mass-edits-bcd-paragraph.py
from pathlib import Path
fixes = []
class Stop(Exception):
"""exit early"""
NEEDLE = """
View peterbe__mass-edits-bcd-paragraph.py
from pathlib import Path
import re
fixes = []
class Stop(Exception):
"""exit early"""
View default.txt
https://developer.mozilla.org/en-US/docs/Glossary/Perceived_performance {"text":"Perceived performance","hasAnchor":false}
https://developer.mozilla.org/en-US/docs/Learn/Accessibility/Accessibility_troubleshooting {"text":"Accessibility troubleshooting","hasAnchor":false}
https://developer.mozilla.org/en-US/docs/Learn/Accessibility/CSS_and_JavaScript {"text":"CSS and JavaScript accessibility best practices","hasAnchor":false}
https://developer.mozilla.org/en-US/docs/Learn/Accessibility/HTML {"text":"HTML: A good basis for accessibility","hasAnchor":false}
https://developer.mozilla.org/en-US/docs/Learn/Accessibility/Mobile {"text":"Mobile accessibility","hasAnchor":false}
https://developer.mozilla.org/en-US/docs/Learn/Accessibility/Multimedia {"text":"Accessible multimedia","hasAnchor":false}
https://developer.mozilla.org/en-US/docs/Learn/Accessibility/WAI-ARIA_basics {"text":"WAI-ARIA basics","hasAnchor":false}
https://developer.mozilla.org/en-US/docs/Learn/Accessibility/What_is_accessibility {"text":"What is
View dev-requirements.txt
-r requirements.txt
-c requirements-constraints.txt
black==21.5b0 \
--hash=sha256:0e80435b8a88f383c9149ae89d671eb2095b72344b0fe8a1d61d2ff5110ed173 \
--hash=sha256:9dc2042018ca10735366d944c2c12d9cad6dec74a3d5f679d09384ea185d9943
flake8==3.9.2 \
--hash=sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b6b1d78057c576b \
--hash=sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907
View requirements-constraints.txt
idna==3.1 \
--hash=sha256:5205d03e7bcbb919cc9c19885f9920d622ca52448306f2377daede5cf3faac16 \
--hash=sha256:c5b02147e01ea9920e6b0a3f1f7bb833612d507592c837a6c49552768f4054e1
urllib3==1.26.4 \
--hash=sha256:2f4da4594db7e1e110a944bb1b551fdf4e6c136ad42e4234131391e21eb5b0df \
--hash=sha256:e7b021f7241115872f92f43c6508082facffbd1c048e3c6e2bb9c2a157e28937
certifi==2020.12.5 \
--hash=sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c \
--hash=sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830
chardet==4.0.0 \
View fastKSparser.js
function* fastKSParser(s) {
for (const match of s.matchAll(
/\{\{\s*(\w+[\w-\.]*\w+)\s*(\((.*?)\)|)\s*\}\}/gms
)) {
const { index } = match;
if (s.charAt(index - 1) === "\\") {
continue;
}
const split = (match[3] || "").trim().split(",");
@peterbe
peterbe / default.txt
Created May 13, 2021
Result of running: `rg https://mdn.mozillademos.org/files/ --count-matches`
View default.txt
files/en-us/tools/firefox_os_1.1_simulator/index.html:2
files/en-us/tools/page_inspector/how_to/work_with_animations/animation_inspector_example_colon__css_transitions/index.html:1
files/en-us/tools/page_inspector/how_to/work_with_animations/animation_inspector_example_colon__web_animations_api/index.html:1
files/en-us/games/techniques/crisp_pixel_art_look/index.html:1
files/en-us/web/svg/attribute/k4/index.html:2
files/en-us/web/svg/attribute/k1/index.html:2
files/en-us/web/svg/attribute/k2/index.html:2
files/en-us/web/svg/attribute/xchannelselector/index.html:2
files/en-us/web/svg/attribute/ychannelselector/index.html:2
files/en-us/web/svg/attribute/begin/index.html:1