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
| import {useEffect, useMemo} from 'react' | |
| import {RecoilRoot, useRecoilState, atom} from 'recoil' | |
| // User data | |
| const user1 = {username: 'joe', bio: "You will never see me, unless of course this example is totally broken."} | |
| const user2 = {username: 'bob', bio: "I am the one true user."} | |
| const user3 = {username: 'fred', bio: "Just kidding, make way for the new guy."} | |
| // A potentially dangerous mutable global variable for initial state. The main |
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
| const version = 1; | |
| const appPrefix = 'myApp-'; | |
| const staticCacheName = appPrefix + 'static-v' + version; | |
| const imagesCacheName = appPrefix + 'content-imgs'; | |
| var allCaches = [ | |
| staticCacheName, | |
| imagesCacheName | |
| ]; | |
| self.addEventListener('message', event => { |
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
| // Running a container (run command will downlaod a and install a image) | |
| docker run hello-world | |
| // Running a command inside a container | |
| docker run busybox echo hi there | |
| docker run busybox ls |
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)); |
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
| from os import system | |
| import getpass | |
| print("1.ROCK...") | |
| print("2.PAPER...") | |
| print("3.SCISSIOR...") | |
| #player1 = input("player 1 , make your move : ") | |
| #system("cls") | |
| #player2 = input("player 2 , make your move : ") |