Posts Posts + Replies
bitfeed
zhangweis
1 year ago
Layer1 layer2 interaction.
zhangweis
1 year ago
Merkle tree proof based data storage
Merkle tree proof based data storage and verification for bitcoin sv script.
zhangweis
1 year ago
jq pivot example for count. jq -n '[{name:"a",date:"08/17"},{name:"a",date:"08/20"},{name:"b",date:"08/20"},{name:"b",date:"08/23"}]' | jq --arg rowfield "name" --arg columnfield "date" "$(curl -s https://gitee.com/zhangweis/deno-report-tools/raw/693d2db3ae8387873e18ec2264937708f0b0dd9c/pivot.jq)"
zhangweis
1 year ago
Time series data collecting using cron, curl and jq (example). 0 0 * * * { tail -n 1 /data/funding_rates_bsv.json; curl -s 'https://www.okex.com/api/swap/v3/instruments/BSV-USD-SWAP/historical_funding_rate?limit=10'; } | jq -s -c '.[0] as $last | .[1] | reverse | map(select(.funding_time>$last.funding_time)) | .[]' >> /data/funding_rates_bsv.json
zhangweis
1 year ago
jq sort by string descending. jq -n '["abc", "cba"] | sort_by(explode|map(-.))'