Skip to content

Instantly share code, notes, and snippets.

View leplatrem's full-sized avatar

Mathieu Leplatre leplatrem

View GitHub Profile
/*
* 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.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>IDB demo</title>
</head>
<body>
<div id="results"></div>
<script>
@leplatrem
leplatrem / index.html
Last active January 13, 2023 16:32
passwords
<!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;
[
{
"github": "glasserc",
"tz": "America/New_York"
},
{
"github": "jvehent",
"tz": "US/Eastern"
},
{
@leplatrem
leplatrem / 1263602.patch
Last active April 11, 2016 15:09
Bug 1263602 - Untested code to verify signatures
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",
[{
"versions": [{
"minVersion": "0",
"maxVersion": "*",
"severity": 3,
"vulnerabilityStatus": 0,
"targetApps": {
"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}": [{
"minVersion": null,
"maxVersion": null
@leplatrem
leplatrem / load.py
Created January 25, 2016 09:06
Import json records in Kinto
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 January 22, 2016 12:05
benchmark kinto
<!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>

Update Kinto.js in Firefox

Compile Firefox

First, follow the instructions to build Firefox.

Run Kinto tests

$ ./mach xpcshell-test services/common/tests/unit/test_kinto.js
Verifying that +leplatrem is my blockchain ID. https://onename.com/leplatrem