Skip to content

Instantly share code, notes, and snippets.

View JeanMeche's full-sized avatar
🚂

Matthieu Riegler JeanMeche

🚂
View GitHub Profile
yarn upgrade --scope @babel --latest

Hi, thank you for helping testing this new feature !

To test this feature we're going to use the artifacts generated by this PR : angular/angular#50738.

Install the dependencies

To retrieve the artifacts

  1. Go on to the PR
  2. Look for a job called publish_packages_as_artifacts and open it
  3. Open the artifacts tab and run the following script in the console of your favorite browser :
// Improved version of https://github.com/WICG/navigation-api/blob/main/navigation_api.d.ts
interface NavigationEventMap {
navigate: NavigateEvent;
navigatesuccess: Event;
navigateerror: ErrorEvent;
currententrychange: NavigationCurrentEntryChangeEvent;
}
interface NavigationResult {
type Id<T> = { [P in keyof T]: T[P] }
function assertUnreachable(x: never): never {
throw new Error("Didn't expect to get here");
}
type x = { foo: number, [x: string]: number };
@JeanMeche
JeanMeche / garticphone.js
Last active January 6, 2021 13:03
Export the drawings from the Gartic Phone game https://garticphone.com/
// Run this code when an album is fully display at the end of the game
(async () => {
OffscreenCanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) {
if (w < 2 * r) r = w / 2;
if (h < 2 * r) r = h / 2;
this.beginPath();
this.moveTo(x + r, y);
this.arcTo(x + w, y, x + w, y + h, r);
this.arcTo(x + w, y + h, x, y + h, r);
this.arcTo(x, y + h, x, y, r);
@JeanMeche
JeanMeche / gist:962e733b6f11587dd82494c609547cc3
Created September 29, 2020 22:50
Picture In Picture (PiP) bookmarklet
javascript:(function(){document.getElementsByTagName('video')[0].requestPictureInPicture()})();
@JeanMeche
JeanMeche / NSDate.swift
Created July 4, 2016 14:16
NSDate.swift
//
// NSDate.swift
// Smartlink
//
// Created by Matthieu Riegler on 20/11/15.
//
import Foundation
@JeanMeche
JeanMeche / gist:50102a47937e9896e4f4
Created April 19, 2015 16:47
Levenshtein — swift
/**
* Levenshtein edit distance calculator
* Usage: levenstein <string> <string>
*
* Inspired by https://gist.github.com/bgreenlee/52d93a1d8fa1b8c1f38b
* Improved with http://stackoverflow.com/questions/26990394/slow-swift-arrays-and-strings-performance
*/
class Tools {
@JeanMeche
JeanMeche / angular-mocks-with-real-backend.js
Last active November 23, 2015 11:26
angular-mocks-with-real-backend.js
/**
* @license AngularJS v1.2.25
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*
* Matthieu Riegler - Kyro
* Modified angular-mocks.js to make Integration tests with real backend async calls (but keeps E2E mocks)
* Works great with Jasmine 2.0.1
*/
(function(window, angular, undefined) {
#!/bin/bash
rm -R /System/Library/Frameworks/Python.framework/Versions/3.4
mv /Library/Frameworks/Python.framework/Versions/3.4 /System/Library/Frameworks/Python.framework/Versions
chown -R root:wheel /System/Library/Frameworks/Python.framework/Versions/3.4
rm /System/Library/Frameworks/Python.framework/Versions/Current
ln -s /System/Library/Frameworks/Python.framework/Versions/3.4 /System/Library/Frameworks/Python.framework/Versions/Current
rm /usr/bin/pydoc
rm /usr/bin/python