Skip to content

Instantly share code, notes, and snippets.

View AColocho's full-sized avatar
👋

Alejandro AColocho

👋
  • Washington D.C
View GitHub Profile
@AColocho
AColocho / jwtRS256.sh
Created August 31, 2023 03:22 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@AColocho
AColocho / dictionary_order_one_liner.py
Created February 11, 2021 16:57
One liner to order a dictionary by value or key.
#source https://stackoverflow.com/questions/613183/how-do-i-sort-a-dictionary-by-value
#Replace x with the dictionary name
#If ordering by value item[1] else item[0]
{k: v for k, v in sorted(x.items(), key=lambda item: item[1])}