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
async function useAsyncHandler(callback) { | |
try { | |
const data = await callback | |
return [data, null] | |
} catch(error) { | |
console.error(error, "error log from async handler") | |
return [null, error] | |
} |
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
<?php | |
class CodeGenerator | |
{ | |
private static $alphabet = '23456789abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'; | |
private static $max_offset = 55; | |
/** | |
* Generate a random character of non-ambiguous number or letter. | |
* @return string the character |