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
import base64 | |
import ecdsa | |
def generate_vapid_keypair(): | |
""" | |
Generate a new set of encoded key-pair for VAPID | |
""" | |
pk = ecdsa.SigningKey.generate(curve=ecdsa.NIST256p) | |
vk = pk.get_verifying_key() |
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
// ------------------------------------- | |
// Example from react-router | |
// @ref https://reacttraining.com/react-router/web/example/preventing-transitions | |
// ------------------------------------- | |
import React from 'react'; | |
import { | |
BrowserRouter as Router, | |
Route, | |
Link |
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
Show hidden characters
{ | |
"presets": [ | |
["env", { "modules": false }] | |
], | |
"env": { | |
"es": {}, | |
"lib": { | |
"plugins": [ | |
"transform-es2015-modules-commonjs" |
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
{"lastUpload":"2020-07-17T14:55:57.591Z","extensionVersion":"v3.4.3"} |
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
// ------------------------------------- | |
// BEM Helper | |
// Inspired by 14islands/bem-helper-js | |
// @ref https://github.com/14islands/bem-helper-js | |
// | |
// Usage: | |
// const bem = BEM('header'); | |
// const bem2 = bem.element('title'); | |
// const bem3 = bem2.modifier('highlight'); | |
// |