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
| filename=go1.13.4.linux-armv6l.tar.gz | |
| gohash=9f76e6353c9ae2dcad1731b7239531eb8be2fe171f29f2a9c5040945a930fd41 | |
| sudo rm -rf /usr/local/go | |
| wget https://dl.google.com/go/$filename | |
| sudo tar -C /usr/local -xvf $filename | |
| filehash=$(sha256sum $filename | cut -d ' ' -f1) | |
| if [ $filehash != $gohash ] | |
| then | |
| echo "Filehash was not equal" | |
| exit 0 |
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 koa = require('koa') | |
| const app = new koa() | |
| const serve = require('koa-static-server') | |
| const options = { | |
| rootDir: './html', | |
| forbidden :['forbidden'], | |
| gzip: true, | |
| index: 'index.html' | |
| } | |
| const port = (process.env.PORT && isValidPort(process.env.PORT)) ? parseInt(process.env.PORT) : 3005 |
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
| package fib | |
| import ( | |
| "testing" | |
| ) | |
| func Fib(n int) int { | |
| switch n { | |
| case 0: | |
| return 0 |
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
| package fib | |
| import ( | |
| "testing" | |
| ) | |
| func BenchmarkFib20(b *testing.B) { | |
| for n := 0; n < b.N; n++ { | |
| Fib(20) // run the Fib function b.N times | |
| } |
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
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "log" | |
| "os" | |
| "unicode" | |
| "github.com/pkg/profile" |
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
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "io" | |
| "log" | |
| "os" | |
| "unicode" |
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
| package main | |
| import ( | |
| "math/rand" | |
| "runtime" | |
| "github.com/pkg/profile" | |
| ) | |
| const count = 100000 |
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
| [ | |
| { | |
| "name": "owner", | |
| "type": "address" | |
| }, | |
| { | |
| "name": "spender", | |
| "type": "address" | |
| }, | |
| { |
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 { Wallet, Contract, providers, BigNumber, utils } from 'ethers' | |
| import { readFileSync } from 'fs' | |
| import { _TypedDataEncoder } from "@ethersproject/hash" | |
| async function permitSign( | |
| wallet: Wallet, | |
| token: any, | |
| approve: { | |
| spender: string | |
| value: BigNumber |
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
| [ | |
| "TUSD", | |
| "LON", | |
| "BOND", | |
| "RAI", | |
| "UMA", | |
| "YFI", | |
| "BAT", | |
| "MANA", | |
| "1INCH", |