Skip to content

Instantly share code, notes, and snippets.

@chencang
chencang / 1_Storage.sol
Created October 23, 2020 02:09
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.26+commit.4563c3fc.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint256 number;
@chencang
chencang / parse_csv_demo.sh
Created March 21, 2019 09:36 — forked from huandu/parse_csv_demo.sh
Demo to parse CSV file with awk.
# parse csv files to an awk array.
awk -F, '{
parse_csv(r);
# replace following line with your code.
print r[1], r[2], r[3], r[4];
} function parse_csv(r, _quote, _i, _n) {
_i = 1;
_quote = 0; # in a quoted string or not.