-
Enable
#enable-devtools-experiments
flag inchrome://flags
section. -
Open Chorme Devtools and check
Settings > Experiments > Allow extensions to load custom stylesheets
. -
Create the following four files in a dedicated folder.
3.1.
devtools.html
<html> <head></head> <body><script src="devtools.js"></script></body>
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net" | |
"net/http" | |
"net/url" | |
"crypto/tls" |
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
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"flag" | |
"io" | |
"io/ioutil" | |
"log" | |
"os" |
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
{ | |
"scripts": { | |
"ram": "yarn ram-check-disk && yarn ram-create-disk && yarn ram-link-node-modules && yarn ram-link-build && yarn install && yarn start", | |
"ram-check-disk": "[ -d /Volumes/npm_ram_disk ] && echo 'Disk already mounted!' && yarn build && exit 1 || exit 0", | |
"ram-create-disk": "diskutil erasevolume hfsx npm_ram_disk `hdiutil attach -nomount ram://1600000`", | |
"ram-link-node-modules": "mkdir /Volumes/npm_ram_disk/node_modules && rm -r -f ./node_modules && ln -s /Volumes/npm_ram_disk/node_modules ./node_modules", | |
"ram-link-build": "mkdir /Volumes/npm_ram_disk/build && rm -r -f ./build && ln -s /Volumes/npm_ram_disk/build ./build", | |
} | |
} |
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
using System; | |
using System.Security.Cryptography; | |
public class PBKDF2 | |
{ | |
private int hashBytes; | |
private int saltBytes; | |
private int iterations; | |
public PBKDF2(int _hashBytes, int _saltBytes, int _iterations) |
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
/** | |
* TypeScript version of @istarkov's cancellable Promise wrapper. | |
* | |
* @see https://github.com/facebook/react/issues/5465#issuecomment-157888325 | |
*/ | |
const makeCancelable = <T>(promise: Promise<T>): { promise: Promise<T>; cancel(): void } => { | |
let hasCanceled = false; | |
const wrappedPromise = new Promise<T>((resolve, reject) => { | |
promise.then( |
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
/** | |
* Deep copy function for TypeScript. | |
* @param T Generic type of target/copied value. | |
* @param target Target value to be copied. | |
* @see Source project, ts-deepcopy https://github.com/ykdr2017/ts-deepcopy | |
* @see Code pen https://codepen.io/erikvullings/pen/ejyBYg | |
*/ | |
export const deepCopy = <T>(target: T): T => { | |
if (target === null) { | |
return target; |