Skip to content

Instantly share code, notes, and snippets.

View anakornk's full-sized avatar
🎯
Focusing

Anakorn Tata Kyavatanakij anakornk

🎯
Focusing
View GitHub Profile
@anakornk
anakornk / index.sh
Created October 21, 2020 08:24 — forked from max-mapper/index.sh
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
@anakornk
anakornk / TetherToken.sol
Created May 17, 2018 02:35 — forked from plutoegg/TetherToken.sol
TetherToken.sol - Tether.to USD
pragma solidity ^0.4.11;
/**
* Math operations with safety checks
*/
library SafeMath {
function mul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;