This file contains 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
mkdir -p ~/.local/share/fonts | |
for type in Bold Light Medium Regular Retina; do wget -O ~/.local/share/fonts/FiraCode-$type.ttf "https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-$type.ttf?raw=true"; done | |
fc-cache -f |
This file contains 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
const Eureka = require('eureka-js-client').Eureka; | |
const eurekaHost = (process.env.EUREKA_CLIENT_SERVICEURL_DEFAULTZONE || '127.0.0.1'); | |
const eurekaPort = 8761; | |
const hostName = (process.env.HOSTNAME || 'localhost') | |
const ipAddr = '172.0.0.1'; | |
exports.registerWithEureka = function(appName, PORT) { | |
const client = new Eureka({ | |
instance: { |
This file contains 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 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