Skip to content

Instantly share code, notes, and snippets.

Memmie Lenglet mems

Block or report user

Report or block mems

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
@mems
mems / Third party SLA.md
Last active Jul 22, 2019
SLA for website third parties
View Third party SLA.md
@mems
mems / Times-series.md
Last active Mar 31, 2019
About time-series data
View Times-series.md

navigator.sendBeacon()

Azure Time Series Insights

It's not Azure Monitor and Application Insights

No Grafana plugin exist yet

@mems
mems / Code coverage.md
Last active Jun 7, 2019
Web frontend code coverage
View Code coverage.md

Every line of code we write today will end up as someone’s legacy code.

Everything that you write is going to disappears some day

RUM Code coverage, chose a 1h timeframe (per day) where 1% traffic run that the test

JS coverage

FES javascript instrimentation visualization

@mems
mems / index.html
Last active Mar 30, 2019
Webpage resources graph (read HAR)
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Webpage resources graph</title>
<script>
function readFileAsText(file){
const reader = new FileReader();
reader.readAsText(file);
return new Promise((resolve, reject) => {
@mems
mems / IFrameResizerLight.js
Last active Nov 26, 2018
Light version Iframe resizer
View IFrameResizerLight.js
/*
IFrame Resizer light version
Based on [iframe-resizer](https://github.com/davidjbradshaw/iframe-resizer)
- this version lib to have the base/minimal features
- only use default values
- force resize the iframe when parent window is resized
To avoid memory leaks, only iframes (with a specific classname) that are attached to the document are handled
Window events listeners are shared.
If the iframe is removed from document (detached nodes) subsequent message events are ignored
@mems
mems / icloudtabs2md.js
Last active Jul 15, 2019
Generate a markdown links list from iCloud tabs
View icloudtabs2md.js
#!/usr/bin/env node
/*
Generate a markdown links list from iCloud tabs, on macOS
Usage:
./icloudtabs2md.js > icloudtabs.md
./icloudtabs2md.js | pbcopy
Require:
@mems
mems / msrdwa-for-all.user.js
Last active Dec 12, 2017
[Userscript] Microsoft Remote Desktop Web Access for all
View msrdwa-for-all.user.js
// ==UserScript==
// @name Microsoft Remote Desktop Web Access for all
// @namespace memmie.lenglet.name
// @author mems <memmie@lenglet.name>
// @homepageURL https://github.com/mems/...
// @description Allow to use RD Web Access on browser that don't support RD ActiveX
// @match *://*/RDWeb/Pages/*
// @updateURL https://openuserjs.org/install/mems/...
// @version 1.0.0
// ==/UserScript==
@mems
mems / chunked.php
Created May 22, 2017
Chunked transport encoding video
View chunked.php
<?php
if(isset($_GET['videofile'])){
// PHP encode transfer automatically if you use flush() and output_buffering is activated (don't need to use special header nor chunk metadata)
// http://php.net/manual/en/outcontrol.configuration.php#ini.output-buffering
header('Transfer-Encoding: chunked');
header('Content-Encoding: none');
// No cache
header('Cache-Control: no-cache, no-store, must-revalidate');
@mems
mems / README.md
Created Oct 6, 2016
Convert Thunderbird mbox to maildir
View README.md

Email file name is the timestamp of received email (in microseconds). Example: 1466698612265640, start with From - Thu Jun 23 18:16:52 2016 (Thu Jun 23 2016 18:16:52 GMT+0200 (CEST))

Use NodeJS:

// Note: this script not work properly if an email contains "\n\nFrom - "
const fs = require('fs');
const path = require('path');
You can’t perform that action at this time.