Skip to content

Instantly share code, notes, and snippets.

Avatar

Pascal Chevrel pascalchevrel

View GitHub Profile
@pascalchevrel
pascalchevrel / karma.php
Last active March 1, 2023 16:11
Uplift Karma value
View karma.php
<?php
declare(strict_types=1);
function getJson(string $url): array
{
$data = file_get_contents($url);
return json_decode($data, true, 512, JSON_THROW_ON_ERROR);
}
$bugs = [
@pascalchevrel
pascalchevrel / getBuilds.php
Last active December 22, 2021 23:39
Get Firefox Nightly build ids and associated revisions for a date
View getBuilds.php
<?php
/*
Proof of concept.
PHP script which queries BuildHub for a date (https://buildhub.moz.tools)
and returns a json array with the Firefox Nightly build IDs for this day
as keys and the mercurial revision they were built from as values.
Documention and other scripts on querying buildhub:
- https://buildhub2.readthedocs.io/en/latest/user.html#example-is-this-an-official-build-id
- https://github.com/mozilla/crash-stop-addon/blob/master/crashstop/buildhub.py#L183
View Storage API
We are happy to announce that the Storage API feature is ready for testing in Firefox Nightly Desktop!
Storage API
The Storage API allows Web sites to find out how much space users can use (quota), how much they are already using (usage) and can also tell Firefox to store this data persistently and per origin. This feature is available only in secure contexts (HTTPS). You can also use Storage APIs via Web Workers.
There are plenty of APIs that can be used for storage, e.g., localStorage, IndexedDB. The data stored for a Web site managed by Storage API — which is defined by the Storage Standard specification — includes:
IndexedDB databases
Cache API data
View gist:5f25b7f06ce85257757f6b95a3e118ee
Exciting! Firefox is now providing simple and chic interfaces for representing, setting and picking a time or date on Nightly. Various content attributes defined in the HTML standard, such as @step, @min, and @max, are implemented for finer-grained control over data values.
Take a closer look at this feature, and come join us in making it better with better browser compatibility!
What’s Currently Supported
<input type=time>
The default format is shown as below.
Here is how it looks when you are setting a value for a time. The value provided must be in the format “hh:mm[:ss[.mmm]]”, according to the spec.
@pascalchevrel
pascalchevrel / today_in_nightly.php
Last active December 22, 2021 23:39
Get all the changesets in Nightly between the current build and the previous one
View today_in_nightly.php
<?php
function getBuilId(string $raw_build_id): array {
return [
'year' => substr($raw_build_id, 0, 4),
'month' => substr($raw_build_id, 4, 2),
'day' => substr($raw_build_id, 6, 2),
'hour' => substr($raw_build_id, 8, 2),
'minute' => substr($raw_build_id, 10, 2),
'second' => substr($raw_build_id, 12, 2),
@pascalchevrel
pascalchevrel / byzanz-record-window.sh
Created January 17, 2017 12:55
A bash script to screencast a window into a Gif with good quality
View byzanz-record-window.sh
#! /usr/bin/env bash
# This script uses byzanz-record to generate an animated Gif for your interactions
# with a window
# usage:
# Record a window for 3 seconds and save to /home/foo/yo.gif
# byzanz-record-window 3 /home/foo/yo.gif
#
# without parameters, it defaults to 10s and a target file in /tmp/screencast.gif
#
View sysreq50_1_0.md

Windows

Operating Systems (32-bit and 64-bit)

  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Vista (32-bit Firefox only)
  • Windows Server 2003 SP1 (32-bit Firefox only)
  • Windows XP SP2 (32-bit Firefox only)
@pascalchevrel
pascalchevrel / sysreq50_1_0.md
Created December 20, 2016 11:22
system requirements text update
View sysreq50_1_0.md

Windows

Operating Systems (32-bit and 64-bit)

  • Windows XP SP2
  • Windows Server 2003 SP1
  • Windows Vista
  • Windows 7
  • Windows 8
  • Windows 10
@pascalchevrel
pascalchevrel / nightlyUpdate.py
Created September 14, 2016 13:19
Script to check if an update to Nightly is available for a platform. Usage: nightlyUpdate.py en-GB win64
View nightlyUpdate.py
#!/usr/bin/python
import sys
import urllib2
import json
from datetime import datetime, timedelta
import sys
@pascalchevrel
pascalchevrel / check_locales_product_details.php
Last active August 5, 2016 11:14
PHP script checking if the data in product-details for aurora and nighmty matches what we actually build from mercurial
View check_locales_product_details.php
<?php
function getJson($file) {
return json_decode(
file_get_contents('https://product-details.mozilla.org/1.0/' . $file),
true
);
}
function getProductDetailsLocales($version) {