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
/** | |
* Asynchronously retry a given task the given times, but as least as long as the task does not | |
* throw an error or returns the first time. The return value is a promise with the value | |
* of the rejected/resolved task. | |
*/ | |
export const retryAsync = (times, task) => { | |
if (!task || typeof task !== 'function' || times < 0) { | |
throw new TypeError( | |
'No task passed or task is not of type function or times is a negative value.' | |
); |
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
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |