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
# Generate Private Key | |
openssl genrsa -out jwt-key-name 4096 | |
# Dont add passphrase | |
# ssh-keygen should generate private and public key | |
# Update public key using openssl | |
openssl rsa -in jwt-key -pubout > jwt-key-name.pub | |
# Formatting private key into single line | |
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' jwt-key-name |
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
function setContrastText(hexColor="", isBlackAndWhite=false) { | |
if (!hexColor) return "black" | |
if (hexColor.slice(0, 1) === "#") { | |
hexColor = hexColor.slice(1) | |
} | |
if (hexColor.length === 3) { | |
hexColor = hexColor.repeat(2) | |
} |
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
function downloadCSV(csvTitle = "", csvHeader = [], csvData = []) { | |
// create filename using today unix time | |
const today = new Date().getTime() | |
const fileName = "Download-" + today + ".csv"; | |
// Create title for csv | |
const title = csvTitle || "Download CSV example" | |
// Add header into first row | |
csvData.splice(0, 0, csvHeader) |