- brew install hyperkit
- brew install docker-machine-driver-hyperkit
- sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit && sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit
- brew install minikube
- minikube start --logtostderr --vm-driver=hyperkit
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
package main | |
import "fmt" | |
func main() { | |
targetPool := "A" | |
arbPools0 := []string{"B"} | |
hops0 := spreadSingleHop(targetPool, arbPools0) | |
fmt.Println(hops0) |
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
package main | |
import ( | |
"fmt" | |
) | |
type TemplateCacheAlias map[string]int | |
func (t *TemplateCacheAlias) Get(name string) int { | |
return (*t)[name] |
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
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"strconv" | |
"github.com/ethereum/go-ethereum/common" | |
"github.com/ethereum/go-ethereum/common/hexutil" |
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
INSERT INTO `lon_mining_powers` (`round`, `wallet_address`, `lon`, `acc_trader_fee`, `acc_trader_txs`, `trader_power`, `acc_referer_fee`, `acc_referer_txs`, `referer_power`, `start_block`, `end_block`, `invitee_power`, `invitee_lon`, `acc_maker_fee`, `acc_maker_txs`, `maker_power`, `tx_hash`, `phase`, `relayer_power`, `relayer_lon`, `acc_relayer_txs`) | |
VALUES | |
(0, '0xe0f5069f617D99f9Ff40E96A36579A57890F6201', 0.000000000, 6.155428, 1, 131.995135, 0.000000, 0, 0.000000, 12333704, 12333704, 61.554280, 0.000000, 0.000000, 0, 0.000000, NULL, 1, 0.000000, 0.000000, 0), | |
(0, '0xFe9941141b1D4eDa04A6BDb67735E00f3F983A9C', 0.000000000, 21.822680, 1, 293.438918, 0.000000, 0, 0.000000, 12333690, 12333690, 0.000000, 0.000000, 0.000000, 0, 0.000000, NULL, 1, 0.000000, 0.000000, 0); | |
update lon_mining_powers set relayer_power=16169063.787222, acc_relayer_txs=24408 where wallet_address='0x03f34be1bf910116595db1b11e9d1b2ca5d59659' and phase=1; | |
update lon_mining_powers set acc_maker_fee=258938.55588306, maker_power=2589385.5 |
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
package driver | |
import ( | |
"context" | |
"go.mongodb.org/mongo-driver/bson" | |
"go.mongodb.org/mongo-driver/mongo" | |
) | |
type Filter struct { | |
ds map[string]interface{} |
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
Ctrl + d 删除一个字符,相当于通常的Delete键(命令行若无所有字符,则相当于exit;处理多行标准输入时也表示eof) | |
Ctrl + h 退格删除一个字符,相当于通常的Backspace键 | |
Ctrl + u 删除光标之前到行首的字符 | |
Ctrl + k 删除光标之前到行尾的字符 | |
Ctrl + c 取消当前行输入的命令,相当于Ctrl + Break | |
Ctrl + a 光标移动到行首(Ahead of line),相当于通常的Home键 | |
Ctrl + e 光标移动到行尾(End of line) | |
Ctrl + f 光标向前(Forward)移动一个字符位置 | |
Ctrl + b 光标往回(Backward)移动一个字符位置 | |
Ctrl + l 清屏,相当于执行clear命令 |
Sometimes a python script will simply hang forever with no indication of where things went wrong. Perhaps it's polling a service that will never return a value that allows the program to move forward. Here's a way to see where the program is currently stuck.
Install gdb.
# Redhat, CentOS, etc
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
docker network create mongo | |
docker run -d \ | |
-p 0.0.0.0:27017:27017 \ | |
--name mongo-rs1 \ | |
--net mongo \ | |
mongo:3.4.20-xenial mongod --replSet mongo-rs1 | |
docker run -d \ | |
-p 0.0.0.0:27027:27017 \ |
NewerOlder