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 fs = require('fs'); | |
const path = require('path'); | |
const inquirer = require('inquirer'); | |
const uuidv4 = require('uuid/v4'); | |
const owasp = require('owasp-password-strength-test'); | |
const words = new Set([...require('wordlist-english')['english/10'], ...require('wordlist-english')['english/20']]); | |
const thingsIDontDoAnyMore = require("./thingsIDontDoAnyMore.json"); | |
const { items } = require('./bitwarden_export_file.json'); |
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
// For node and pre-babel src | |
const toSafeSlug = str => "_" + encodeURIComponent(str) | |
.replace(/[.!~*'()_-]/g, match => `%${match.charCodeAt(0).toString(16)}`.toUpperCase()) | |
.replace(/%/g, "_"); | |
const fromSafeSlug = str => decodeURIComponent(str.substring(1).replace(/_/g, "%")); | |
// ES5 friendly |
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 debounce = (func, ms = 500) => { | |
let timeout; | |
return function(...args) { | |
clearTimeout(timeout); | |
return new Promise(resolve => { | |
timeout = setTimeout(() => { | |
resolve(func.bind(this)(...args)); | |
}, ms); | |
}); | |
}; |
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 React, { useState, useEffect, useRef } from 'react'; | |
window.windowWidthListeners = window.windowWidthListeners || {}; | |
window.prevWidth = window.prevWidth || window.innerWidth; | |
window.addEventListener('resize', () => { | |
if (window.prevWidth !== window.innerWidth) { | |
window.prevWidth = window.innerWidth; | |
Object.values(window.windowWidthListeners).forEach(fn => fn(window.prevWidth)); | |
} |
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
#!/bin/bash | |
touch urls.txt | |
CURR=`pwd` | |
if [ $# -ne 0 ] | |
then | |
let COUNT=0 | |
mkdir $1 | |
while read url |
NewerOlder