Home
Yates Zhang
Cancel

Data Too Long For Text Field

refer to: https://github.com/vinsol-spree-contrib/spree_themes/issues/26 issue description Mysql2::Error: Data too long for column 'nmap_result' at row 1 (ActiveRecord::ValueTooLong) from /home/...

连接postgre数据库时报error:column_proisagg_dose_not_exist

连接Postgre数据库时报ERROR:column "proisagg" dose not exist 需要升级pgadmin了. 非常奇怪 refer to:  https://blog.csdn.net/weixin_44671994/article/details/87935656 我的pg_admin是3.x 的.需要升级了.

为git_commit_增加签名

refer to:  https://gist.github.com/ankurk91/c4f0e23d76ef868b139f3c28bde057fc  https://www.linuxjournal.com/content/signing-git-commits 1. 创建一个新的gpg:  # Ubuntusudo apt-get install gpa...

Go单元测试 Unit Test For Go

单元测试,一个不断被强调,但又不断被忽略的话题,从一名码农成长为一名优秀的工程师,单元测试,是必不可少的技能。单元测试是在所有测试环节中最先完成的,在我们写代码的过程中就需要写单元测试,也可能在未写代码前先写测试。个人认为编码能力,代码评审和单元测试是一个研发同学必备的三大重要技能。 Go常用测试框架 框架名称特征优点缺点备注Testingtable-driver测试支持基准测试Go原生简...

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 环境下运行时。