Skip to content

Instantly share code, notes, and snippets.

View StalinMazaEpn's full-sized avatar
💻
Improving Skills and Knowledge

Stalin StalinMazaEpn

💻
Improving Skills and Knowledge
View GitHub Profile
@MadsAkselsen
MadsAkselsen / logLocalStorage.ts
Last active December 24, 2022 02:51
Print the localStorage usage
// paste into dev tools console to see localStorage usage
const checkLocalStorage = () => {
console.log(
"%clocalStorage Usage",
`font-weight: bold; color: grey;
padding: 5px; border-top: solid 2px grey;
border-bottom: solid 2px grey; margin-top: 10px`
);
@Klerith
Klerith / plugins.md
Last active August 21, 2024 13:56
Lista de plugins que uso en VSC
@Klerith
Klerith / parse-jwt.js
Created March 15, 2018 15:07
Parse - JWT - Obtener Payload y fecha de creación y expiración
function parseJwt (token) {
var base64Url = token.split('.')[1];
var base64 = base64Url.replace('-', '+').replace('_', '/');
return JSON.parse(window.atob(base64));
};
@max-mapper
max-mapper / index.sh
Last active November 2, 2023 10:13
generate ES512 and RS256 elliptic curve keypairs for JWT JWK (JSON Web Token JSON Web Key) using openssl
# RS256
# private key
openssl genrsa -out rs256-4096-private.rsa 4096
# public key
openssl rsa -in rs256-4096-private.rsa -pubout > rs256-4096-public.pem
# ES512
# private key
openssl ecparam -genkey -name secp521r1 -noout -out ecdsa-p521-private.pem
# public key