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 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.diff
diff --git a/package-lock.json b/package-lock.json
index b5cbafd24..bdb526806 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2013,7 +2013,7 @@
"@types/babel__template": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.0.2.tgz",
- "integrity": "sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg==",
+ "integrity": "sha1-T/Y9a1Lt2sHee5daUiPtMuzqkwc=",
View peterbe__alter_tables_utf8mb4.py
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "kuma.settings.local")
application = get_wsgi_application()
from urllib.parse import urlparse
from django.db import connection
from django.conf import settings
View all_alter_tables.sql
ALTER DATABASE developer_mozilla_org CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
ALTER TABLE users_usersubscription CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
ALTER TABLE auth_user_groups CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
ALTER TABLE attachments_trashedattachment CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
ALTER TABLE soapbox_message CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
View orphans.txt
https://wiki.developer.mozilla.org/kab/docs/Glossary/aneggaf
https://wiki.developer.mozilla.org/pl/docs/API_dostępu_do_danych_z_kanałów
https://wiki.developer.mozilla.org/pl/docs/Web/HTML/Element/comment
https://wiki.developer.mozilla.org/pl/docs/Web/API/Stylesheet/ownerRule
https://wiki.developer.mozilla.org/pl/docs/Web/JavaScript/Guide/Obsolete_Pages/Przewodnik_po_języku_JavaScript_1.5/Dodawanie_obiektom_nowej_funkcjonalności.
https://wiki.developer.mozilla.org/pl/docs/Web/JavaScript/Guide/Obsolete_Pages/Przewodnik_po_języku_JavaScript_1.5/Instrukcje_obsługi_wyjątków/Instrukcja_try...catch
https://wiki.developer.mozilla.org/pl/docs/Web/JavaScript/Guide/Obsolete_Pages/Przewodnik_po_języku_JavaScript_1.5/Instrukcje_obsługi_wyjątków/Instrukcja_throw
https://wiki.developer.mozilla.org/pl/docs/Web/JavaScript/Guide/Obsolete_Pages/Przewodnik_po_języku_JavaScript_1.5/Instrukcje_obsługi_wyjątków
https://wiki.developer.mozilla.org/pl/docs/Web/JavaScript/Guide/Obsolete_Pages/Przewodnik_po_języku_JavaScript_1.5/Praca_z
View gist:ba9104094dca192506d14294bda75677
▶ cat content/files/en-us/_redirects.txt| rg '#'
# FROM-URL TO-URL
/en-US/docs/DOM/window.arguments /en-US/docs/Working_with_windows_in_chrome_code#Passing_data_between_windows
/en-US/docs/ECMAScript_DontEnum_attribute /en-US/docs/Web/JavaScript/Data_structures#Properties
/en-US/docs/JavaScript/Reference/Global_Objects/Array/JavaScript_-_Array#splice /en-US/docs/JavaScript/Reference/Global_Objects/Array/splice
/en-US/docs/Learn/HTML/Howto/Add_Flash_content_within_a_webpage /en-US/docs/Learn/HTML/Multimedia_and_embedding/Other_embedding_technologies#The_%3Cembed%3E_and_%3Cobject%3E_elements
/en-US/docs/Learn/HTML/Howto/Add_citations_to_webpages /en-US/docs/Learn/HTML/Introduction_to_HTML/Advanced_text_formatting#Quotations
/en-US/docs/Learn/HTML/Howto/Add_images_to_a_webpage /en-US/docs/Learn/HTML/Multimedia_and_embedding/Images_in_HTML#How_do_we_put_an_image_on_a_webpage
/en-US/docs/Learn/HTML/Howto/Annotate_images_and_graphics /en-US/docs/Learn/HTML/Multimedia_and_embedding/Images_in_HTML#Annotating_images_w
View peterbe__import-parent-checker.js
const fs = require("fs");
const path = require("path");
const yaml = require("js-yaml");
const enUS = new Set();
function walkAndLog(root) {
fs.readdirSync(root).forEach(file => {
let filepath = path.join(root, file);
if (fs.statSync(filepath).isDirectory()) {
View peterbe__import-parent-checker.js
const fs = require("fs");
const path = require("path");
const yaml = require("js-yaml");
const enUS = new Set();
function walkAndLog(root) {
fs.readdirSync(root).forEach(file => {
let filepath = path.join(root, file);
if (fs.statSync(filepath).isDirectory()) {
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.diff
diff --git a/kuma/api/v1/tests/test_views.py b/kuma/api/v1/tests/test_views.py
index 297abf558..58e7f3270 100644
--- a/kuma/api/v1/tests/test_views.py
+++ b/kuma/api/v1/tests/test_views.py
@@ -94,7 +94,11 @@ def test_doc_api(client, trans_doc):
for_wiki_site=True,
)
assert doc_data["translateURL"] == absolutify(
- reverse("wiki.select_locale", args=(trans_doc.slug,), locale=trans_doc.locale)
+ reverse(
You can’t perform that action at this time.