[email protected]:~$

  • Rust contract, part 2 - Write contract with ckb-contract-std

    This article introduces the ckb-contract-std library; and shows how to rewrite our minimal contract with ckb-contract-std, to enables syscalls and Vec, String. The previous contract: #![no_std] #![no_main] #![feature(asm)] #![feature(lang_items)] #[no_mangle] pub fn _start() -> ! { exit(0) } /// Exit syscall pub fn exit(_code: i8) -> ! { unsafe {...

  • Build CKB contract with Rust - part 1

    Edited at 2020-01-06 Remove the linker script section since I found its unnecessary to customize linker Refactor the main function interface AFAIK, the most popular contracts that deployed on CKB is writing in C. There are 3 default contracts in the genesis block: secp256k1 lock, secp256k1 multisig lock and Deposited...

  • Mac 定时备份 GitHub 仓库

    GitHub 身为一家在美国的公司,随时有可能不出乎意料的由于不可抗原因停止对用户的服务。 1. 安装备份脚本 python-github-backup 提供了足够多的备份选择 repos, issues, PR 等等,几乎 GitHub 上有价值的信息都可以备份,而且还支持从 MacOS KeyChain 里读取 GitHub token 安装最新版 python-github-backup,README 中表示支持 python3,但我使用时仍遇到了些兼容问题,使用 python2 可以正常运行 pip install git+https://github.com/josegonzalez/python-github-backup.git#egg=github-backup 安装完成,执行命令试一试能否成功备份 2. 申请 GitHub personal access token 去 GitHub 申请 personal access token 尝试执行命令,替换 jjyr 为自己的用户名,access_token 为实际 token,以及替换备份目录路径 github-backup jjyr -t access_token --output-directory /Users/jiangjinyang/github_backups...