Home
Yates Zhang
Cancel

Go 使用国内代理加速开发

$ go env  可以看到:GOPROXY = "https://proxy.golang.org,direct" export GOPROXY=https://goproxy.cn 然后就可以非一般的感觉了。 go get -u github.com/gin-gonic/gin

Go 最新版本import的方式 Custom Import Path

参考: https://stackoverflow.com/questions/15049903/how-to-use-custom-packages go 默认是从github.com上引用的.不过由于种种原因,这个不符合我国国情 而且我们开发的时候都要从本地引入 方法五花八门,版本也各有区别 所以,我们简单一些: 1. 创建一个文件夹,  $ mkdir test_go_mod...

Go一个脚本push To Aws S3

package main import ( “fmt” “os/exec” ) func main(){ //for i := 0; i < 1502; i++ { for i := 0; i < 3; i++ { command := “aws s3 cp –acl public-read-write nft/parachain/” + fmt.Spr...

Blockchain Metamask自动切换网络

refer to: https://docs.metamask.io/guide/rpc-api.html#unrestricted-methods 1. switchEthereumChain 只能切换内置网络 2. addEthereumChain 用来新增外部网络,并且切换。(不能用于内置网络) 下面是完整代码 (记得替换里面的erb tag) window.onload =...

Blockchain 使用metamask 发布contract Deploy Contract With Metamask Programmatically

refer to: https://web3js.readthedocs.io/en/v1.2.11/web3-eth-contract.html#deploy async function loadWeb3() { if (window.ethereum) { window.web3 = new Web3(window.ethereum); window.ethe...

Ruby Forwardable 找不到 Nameerror Uninitialized Constant Forwardable

refer to: https://stackoverflow.com/questions/44040369/class-level-constant-broken-in-ruby-2-3-4 需要使用这个: require 'forwardable' 该问题见于 eth.rb 在ruby 3.1.0 环境下运行时。

Ruby Splat Operator Star

refer to:  https://stackoverflow.com/questions/18289152/what-does-a-double-splat-operator-do * : 叫做 splat operator **:  double splat operator single splat 用法1: a, b = 1,2 a, b = *[1,2] ...

Blockchain 安装solc Install Solc Not Solcjs

solc : https://github.com/ethereum/solidity/releases solcjs :  node package 两者不一样,参数不兼容。 所以,有时候我们需要使用solc 来执行一些命令 安装方法:在上面的  https://github.com/ethereum/solidity/releases中,直接下载二进制文件即可。

Aws 使用aws Cli来上传文件到s3

1. 安装 pip install awscli 2. 登录 aws configure 添加对应的pub key, private key 如何获得 对应的pub key, private key?  (参考:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html&#1...

Linux 替换debian Apt Mirror

refer to: https://mirrors.tuna.tsinghua.edu.cn/help/debian/ bullseye 的mirror: # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-fr...