This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let elliptic = require('elliptic'); | |
| let sha3 = require('js-sha3'); | |
| let ec = new elliptic.ec('secp256k1'); | |
| // let keyPair = ec.genKeyPair(); | |
| let keyPair = ec.keyFromPrivate("97ddae0f3a25b92268175400149d65d6887b9cefaf28ea2c078e05cdc15a3c0a"); | |
| let privKey = keyPair.getPrivate("hex"); | |
| let pubKey = keyPair.getPublic(); | |
| console.log(`Private key: ${privKey}`); | |
| console.log("Public key :", pubKey.encode("hex").substr(2)); |
Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.
NOTE: This logic can be extended to more than two accounts also. :)
The setup can be done in 5 easy steps:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -L https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip -o aws-sam-cli-linux-x86_64.zip | |
| unzip aws-sam-cli-linux-x86_64.zip -d sam-installation | |
| sudo ./sam-installation/install | |
| where sam | |
| sam --version |
OlderNewer

