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 useage at the bottom | |
async function generateTOTP(username, secret, issuer, rotation, digits) { | |
let totp = () => { | |
return new Promise((resolve) => { | |
let counter = TOTP.getCurrentCounter(rotation); | |
TOTP.otp(secret, counter, digits, (cb) => { | |
resolve(cb); | |
}); | |
}); | |
}; |
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
<!-- | |
Adapted from Rebecca Manzi's [Todo App](https://github.com/rebeccamanzi/quasar-todo) for Quasar 1.0.0. This one works | |
correctly with Quasar 2.11.5. To use it, update quasar.config.js > frameworks > plugins to include 'Notify' in the plugins | |
array. | |
--> | |
<template> | |
<q-page class="bg-grey-3 column"> | |
<div class="row q-pa-sm bg-primary"> | |
<q-input |
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
const http = require('http') | |
const Gun = require('gun') | |
// Uncomment for ES6, and remove requires above | |
// import http from 'http' | |
// import Gun from 'gun' | |
const server = http.createServer() | |
const host = 'localhost' |
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
/** | |
* NOTE: Does not work with npm installed heroku-cli | |
* Uninstall with: npm uninstall heroku -g | |
* Install Heroku with: curl https://cli-assets.heroku.com/install.sh | sh | |
*/ | |
const { exec } = require('node:child_process') | |
const expect = require('../expect') | |
describe('Heroku deploy', function(){ | |
it('Returns an error if heroku CREATE fails', async function(){ |