Skip to content

Instantly share code, notes, and snippets.

@fdelbos
fdelbos / golang_android.md
Last active July 19, 2024 00:41
Build and install a go library for android studio
@ccoincash
ccoincash / tokenSwap.scrypt
Last active April 8, 2021 02:45
a token contract support swap pool
import "util.scrypt";
import "merkleTree2.scrypt";
// the token swap has two merkle trees to save data. one for token user, one for pool and the pool token balance
contract TokenSwap {
// the contract init bsv amount
int initBsv;
// the swap pool first liquidity require amount
int firstSaveBsvAmount;
@simov
simov / README.md
Last active July 15, 2024 20:10
Run `node` scripts using `nvm` and `crontab` without hardcoding the node version

Run node scripts using nvm and crontab without hardcoding the node version

cronjob.env.sh

#!/bin/bash

# NVM needs the ability to modify your current shell session's env vars,
# which is why it's a sourced function
@52cik
52cik / npm.taobao.sh
Last active July 14, 2024 15:06
npm 淘宝镜像配置
npm set registry https://r.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二进制包镜像
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二进制包镜像
npm set ELECTRON_MIRROR https://cdn.npm.taobao.org/dist/electron/ # electron 二进制包镜像
npm set puppeteer_download_host https://npm.taobao.org/mirrors # puppeteer 二进制包镜像
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver # chromedriver 二进制包镜像
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver # operadriver 二进制包镜像
@clintongormley
clintongormley / load_test_data.sh
Last active January 5, 2024 07:32
Run these commands in your shell to setup the test data for Chapter 5
curl -XPUT 'http://localhost:9200/us/user/1?pretty=1' -d '
{
"email" : "john@smith.com",
"name" : "John Smith",
"username" : "@john"
}
'
curl -XPUT 'http://localhost:9200/gb/user/2?pretty=1' -d '
{