-
install (co)lima
I haved setup colima already, but you can setup lima vm directly without the (co).
-
prepare the ssh config
$ limactl show-ssh colima -f config >> ~/.ssh/config
in my case, the host name is
lima-colima
. -
install nix in the vm
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
# build python nix shell from a local `./requirements.txt` | |
mkdir ./env | |
cat > ./env/flake.nix << 'EOF' | |
{ | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
poetry2nix = { | |
url = "github:nix-community/poetry2nix"; | |
inputs.nixpkgs.follows = "nixpkgs"; |
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 ( | |
"bytes" | |
"encoding/binary" | |
"math/rand" | |
"sort" | |
"testing" | |
"github.com/stretchr/testify/require" |
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 test | |
import ( | |
"bytes" | |
"encoding/binary" | |
"testing" | |
) | |
var bz1, bz2 [8]byte |
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 ( | |
"bytes" | |
"fmt" | |
"os" | |
"github.com/cosmos/gorocksdb" | |
) |
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
""" | |
Monkey patch py-evm to support console.log | |
""" | |
from eth.abc import ComputationAPI, MessageAPI | |
from eth.vm.computation import BaseComputation | |
from eth_abi import decode_abi | |
from eth_typing import Address | |
CONSOLE_LOG_ADDRESS = Address( |
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
5050 | |
5075 | |
6346 | |
6380 | |
6471 | |
6541 | |
6542 | |
8751 | |
8753 | |
8748 |
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
{ | |
"openapi": "3.0.2", | |
"info": { | |
"title": "FastAPI", | |
"version": "0.1.0" | |
}, | |
"paths": { | |
"/token": { | |
"post": { | |
"summary": "Login", |
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
# Poker Design Notes | |
## 合约框架 | |
### CheckIn | |
- 创建牌桌,初始化参数 | |
- 玩家加入,锁定资产 | |
- 玩家提交公钥和DLOG证明,客户端合并玩家公钥可得全局公钥 |
NewerOlder