Skip to content

Instantly share code, notes, and snippets.

View jwhitlock's full-sized avatar

John Whitlock jwhitlock

View GitHub Profile
@jwhitlock
jwhitlock / output.txt
Created October 20, 2020 22:16
Output of `pip install -vvv --use-feature=2020-resolver` on pip-resolver-demo
$ docker-compose build --no-cache new_resolver
Building new_resolver
Step 1/10 : FROM python:3.9-slim
---> 850a471a743c
Step 2/10 : ARG PIP_EXTRA=--use-feature=2020-resolver
---> Running in 50f6f34c2129
Removing intermediate container 50f6f34c2129
---> 7264f506818a
Step 3/10 : ARG REQS=requirements.txt
---> Running in 3bf0ab1f0933
@jwhitlock
jwhitlock / yarn.root.txt
Created September 28, 2020 16:44
Output of yarn install commands in taskcluster
yarn install v1.22.5
[1/5] 🔍 Validating package.json...
[2/5] 🔍 Resolving packages...
[3/5] 🚚 Fetching packages...
[4/5] 🔗 Linking dependencies...
warning "newrelic > @grpc/grpc-js@1.0.5" has unmet peer dependency "google-auth-library@5.x || 6.x".
[5/5] 🔨 Building fresh packages...
✨ Done in 4.75s.
@jwhitlock
jwhitlock / regions.geojson
Created February 12, 2020 16:23
Ichnaea's Regions files
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jwhitlock
jwhitlock / compare.sh
Created February 4, 2020 19:11
Compare contents of two docker images
#!/bin/bash -x
# https://github.com/mozilla/ichnaea/pull/1064
# opendiff is a recursive GUI diff tool on macOS
# This script leaves a lot of files in the /tmp folder
IMG_NAME=python:3.8.1-slim
SHA1=89d719142de465e7c80195dff820a0bbbbba49b148fbd97abf4b58889372b5e3
SHA2=6ff55b7a7dd4db8cd8098ee78e06a4d64384ea0d6bd771c8dd3fc9da74c48c97
function scan_files {
@jwhitlock
jwhitlock / make_update_script.py
Last active October 2, 2019 17:25
Update mozilla/ichnaea
#!/usr/bin/env python3
# Usage: python make_update_script.py > update.sh; bash update.sh
import sys
def parse_reqs(requirements_content):
all_lines = requirements_content.splitlines()
modules = []
for raw_line in all_lines:
@jwhitlock
jwhitlock / rendering.html
Created January 31, 2019 16:09
Rendering document from PR 5216
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Rendering Documents &mdash; Kuma Documentation</title>
@jwhitlock
jwhitlock / bug_1467834.csv
Created June 25, 2018 21:54
Bug 1467834: How often is EmbedLiveSample broken?
Is OK URL ID Good Bad IDs Bad Content
0 https://developer.mozilla.org/bn-BD/docs/Project:MDN/%E0%A6%85%E0%A6%AC%E0%A6%A6%E0%A6%BE%E0%A6%A8/%E0%A6%B8%E0%A6%AE%E0%A7%8D%E0%A6%AA%E0%A6%BE%E0%A6%A6%E0%A6%95_%E0%A6%B8%E0%A6%B9%E0%A6%BE%E0%A6%AF%E0%A6%BC%E0%A6%BF%E0%A6%95%E0%A6%BE 81761 1 0 2
0 https://developer.mozilla.org/de/docs/Web/API/WindowTimers/setTimeout 57547 0 0 1
0 https://developer.mozilla.org/de/docs/Web/CSS/calc 66957 0 0 2
0 https://developer.mozilla.org/de/docs/Web/HTML/Element/datalist 61185 0 0 1
0 https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/How_to_build_custom_form_widgets 58349 0 0 8
0 https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/How_to_structure_an_HTML_form 55521 0 0 1
0 https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/Your_first_HTML_form 55257 0 0 1
0 https://developer.mozilla.org/en-US/docs/MDN/Contribute/Structures/Macros/Commonly-used_macros 2577 0 0 1
0 https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Method/appendNotification 5182 0 0 1
@jwhitlock
jwhitlock / docker-compose.dev.yml
Created May 18, 2018 16:52
Kuma docker compose for Django 1.9 development
version: "2.1"
services:
web:
command: ./manage.py runserver_plus 0.0.0.0:8000
stdin_open: true
tty: true
dj19:
image: quay.io/mozmar/kuma_base:django-1.9
# command: pytest kuma/landing kuma/search kuma/health --capture=no
@jwhitlock
jwhitlock / npm-shrinkwrap.json
Created May 9, 2018 22:14
My npm-shrinkwrap.json for PR 4768
{
"name": "kuma",
"version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"JSONStream": {
"version": "0.8.4",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz",
"integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=",
@jwhitlock
jwhitlock / bcd_prs.py
Created April 11, 2018 15:33
Generate a list of open PRs on mdn/browser-compat-data, from smallest to largest
#!/usr/bin/env python
'''Create list of PRs, smallest to largest.'''
from __future__ import print_function, unicode_literals
import pprint
import re
import sys
from argparse import ArgumentParser
from datetime import timedelta