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 / 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;
@anakornk
anakornk / script.js
Created April 3, 2020 05:11
add corner ribbon to wordpress
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 / 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