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
View kinto2yaml.py
import argparse
import logging
import ruamel.yaml
from kinto_http import cli_utils
from kinto_http import exceptions as kinto_exceptions
logger = logging.getLogger(__name__)
View upgrading.rst

1.X to 2.X

Validators

Validators now receive the kwargs of the related service definition.

Before:

View kinto-storage-adapter.js
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
View indexeddb-async.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>IDB demo</title>
</head>
<body>
<div id="results"></div>
<script>
View index.html
<!DOCTYPE html><html><head><title></title><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /><style type='text/css'>
body {
font-family:'Helvetica';
letter-spacing:-5px;
background:#000;
background-size:100%;
color:#fff;
margin:0;
padding:0;
font-weight:bold;
View teammates.json
[
{
"github": "glasserc",
"tz": "America/New_York"
},
{
"github": "jvehent",
"tz": "US/Eastern"
},
{
@leplatrem
leplatrem / 1263602.patch
Last active Apr 11, 2016
Bug 1263602 - Untested code to verify signatures
View 1263602.patch
diff --git a/services/common/KintoCertificateBlocklist.js b/services/common/KintoCertificateBlocklist.js
--- a/services/common/KintoCertificateBlocklist.js
+++ b/services/common/KintoCertificateBlocklist.js
@@ -13,16 +13,20 @@ Cu.import("resource://services-common/mo
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "uuidgen",
"@mozilla.org/uuid-generator;1",
View addon.json
[{
"versions": [{
"minVersion": "0",
"maxVersion": "*",
"severity": 3,
"vulnerabilityStatus": 0,
"targetApps": {
"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}": [{
"minVersion": null,
"maxVersion": null
@leplatrem
leplatrem / load.py
Created Jan 25, 2016
Import json records in Kinto
View load.py
import json
import uuid
from kinto_client import Client
client = Client(server_url="https://kinto-leplatrem.herokuapp.com/v1",
auth=('admin', 'password'))
client.create_bucket('guessign', safe=False)
try:
@leplatrem
leplatrem / index.html
Created Jan 22, 2016
benchmark kinto
View index.html
<!DOCTYPE html>
<html>
<head>
<script src="kinto-dev.js"></script>
</head>
<body>
<h1>Benchmark</h1>
<p><span id="count">?</span> records in <span id="time">?</span> sec.
<button id="run">Run</button>
<button id="clear">Clear</button>
You can’t perform that action at this time.