Skip to content

Instantly share code, notes, and snippets.

Mathieu Leplatre leplatrem

Block or report user

Report or block leplatrem

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
@leplatrem
leplatrem / RemoteSettings.rst
Last active Apr 3, 2018
RemoteSettings.rst
View RemoteSettings.rst

Remote Settings

The remote-settings.js module offers the ability to fetch remote settings that are kept in sync with Mozilla servers.

Usage

@leplatrem
leplatrem / bulk.py
Last active Feb 21, 2018
bulk plugins update + request review
View bulk.py
import os
from kinto_http import Client
FIREFOX_GUID = "ec8030f7-c20a-464f-9b0e-13a3a9e97384"
SERVER = os.getenv("SERVER") or "https://settings-writer.prod.mozaws.net/v1"
USERNAME = os.getenv("USERNAME")
PASSWORD = os.getenv("PASSWORD")
View iam-example-balrog.yaml
audience: balrog.stage.mozaws.net
managers:
- releng@mozilla.com
groups:
admins:
- email:mathieu@mozilla.com
- userid:google-oauth2|34351789u0y
policies:
-
id: super-user
View telemetry-example.py
import aiohttp
import asyncio
import json
import sys
PRODUCT = "firefox"
SERVER_URL = "https://buildhub.stage.mozaws.net/v1/buckets/build-hub/collections/releases/search"
@leplatrem
leplatrem / async_pipe.py
Last active Aug 11, 2017
Download, decompress and process gzipped content
View async_pipe.py
import asyncio
import io
import zlib
import sys
import asyncio
import aiohttp
async def download_big_file(loop):
@leplatrem
leplatrem / export.geoson
Created Jun 21, 2017
Italian pizzerias
View export.geoson
This file has been truncated, but you can view the full file.
{
"type": "FeatureCollection",
"generator": "overpass-ide",
"copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.",
"timestamp": "2017-06-20T14:05:51Z",
"features": [
{
"type": "Feature",
"properties": {
@leplatrem
leplatrem / mirror_archives.py
Last active Nov 19, 2018
mirror_archives.py
View mirror_archives.py
import asyncio
import json
import os
import re
from urllib.parse import urlparse
import async_timeout
import aiohttp
import backoff
View gist:289fb866dba8213708fcf762517b846d
import datetime
import json
import requests
import kinto_http
def buildid2iso(buildid):
return datetime.datetime.strptime(buildid, "%Y%m%d%H%M%S").isoformat()
@leplatrem
leplatrem / simple.py
Last active May 11, 2017
Batched producer/consumer
View simple.py
import asyncio
import async_timeout
import concurrent.futures
import random
import time
async def produce(queue, n):
for x in range(n):
# produce an item
View gist:2a78102e4afb43e6ca274d42644bb049
### Keybase proof
I hereby claim:
* I am leplatrem on github.
* I am leplatrem (https://keybase.io/leplatrem) on keybase.
* I have a public key whose fingerprint is 1832 9FDE 40C2 4058 7438 B7FD D1BC 0B8D A13A 19BA
To claim this, I am signing this object:
You can’t perform that action at this time.