Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Anakorn Tata Kyavatanakij anakornk

🎯
Focusing
View GitHub Profile
@anakornk
anakornk / index.sh
Created Oct 21, 2020 — forked from maxogden/index.sh
generate ES512 and RS256 elliptic curve keypairs for JWT JWK (JSON Web Token JSON Web Key) using openssl
View index.sh
# 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 / script.js
Created Apr 3, 2020
add corner ribbon to wordpress
View script.js
let ua = navigator.userAgent.toLowerCase();
let isLine = ua.match(/line/i) == 'line';
let isFacebook = ua.indexOf('fban') > -1 || ua.indexOf('fbav') > -1;
let isAndroid = ua.match(/android/i);
if (isLine || isFacebook) {
let img = document.createElement('img');
img.src = 'https://fm101talk.com/wp-content/uploads/2020/04/corner.png';
img.style.position = 'fixed';
@anakornk
anakornk / TetherToken.sol
Created May 17, 2018 — forked from plutoegg/TetherToken.sol
TetherToken.sol - Tether.to USD
View TetherToken.sol
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;
You can’t perform that action at this time.