This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitHub PRs collapse all feature | |
// @namespace http://tampermonkey.net/ | |
// @version 1.2.3 | |
// @description try to take over the world! | |
// @author You | |
// @include https://github.com/LykkeCity/*/pull/* | |
// @grant none | |
// @require http://code.jquery.com/jquery-3.3.1.min.js#sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8 | |
// @downloadURL http://bit.ly/pr-collapse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Guid { | |
public static newGuid(): Guid { | |
return new Guid('xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => { | |
const r = Math.random() * 16 | 0; | |
const v = (c == 'x') ? r : (r & 0x3 | 0x8); | |
return v.toString(16); | |
})); | |
} | |
public static get empty(): string { | |
return '00000000-0000-0000-0000-000000000000'; |