Skip to content

Instantly share code, notes, and snippets.

View WickyNilliams's full-sized avatar

Nick Williams WickyNilliams

View GitHub Profile
@WickyNilliams
WickyNilliams / generate-ssh-key.sh
Last active December 3, 2018 10:40 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
const ENTITY_REGEX = /&#x([0-9A-F]+);/gi
function entityToChar(substr: string, match: string) {
return String.fromCharCode(parseInt(match, 16))
}
export const HtmlEntity = {
decode: function (str: string) {
return str.replace(ENTITY_REGEX, entityToChar)
},