View spellcheck_files.sh
for f in *.txt ; do echo $f ; aspell list < $f | sort | uniq -c ; done |
View estimate_gas.go
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
ethereum "github.com/ethereum/go-ethereum" | |
"github.com/ethereum/go-ethereum/common" | |
"github.com/ethereum/go-ethereum/ethclient" |
View nginx.conf
if ($http_user_agent ~* 'curl') { | |
rewrite ^(.*)$ /curl_rewrite/$1; | |
} | |
location /curl_rewrite/ { | |
rewrite ^/curl_rewrite/(.*)$ /some-path/$1?$query_string break; | |
proxy_pass http://localhost:8080; | |
} |
View nginx.conf
if ($http_user_agent ~* 'curl|wget') { | |
rewrite ^ http://localhost:8080 permanent; | |
} |
View wget_stdout.sh
wget -qO- https://example.com |
View decode_example.js
// RLP encoded transaction | |
const rawTxHex = '0xed8205fc843b9aca00825208944592d8f8d7b001e72cb26a73e4fa1806a51ac79d88016345785d8a000080808080' | |
// using rlp package to decode values | |
const rlp = require('rlp') | |
const decoded = rlp.decode(rawTxHex) | |
console.log(decoded) | |
/* | |
[ <Buffer 05 fc>, | |
<Buffer 3b 9a ca 00>, |
View example.go
package main | |
import ( | |
"context" | |
"encoding/hex" | |
"fmt" | |
"log" | |
"math/big" | |
"github.com/ethereum/go-ethereum/common" |
View docker-compose.yml
services: | |
image: postgres | |
web: | |
logging: | |
driver: awslogs | |
options: | |
awslogs-region: us-east-1 | |
awslogs-group: MyGroup | |
awslogs-create-group: "true" |
View submodules_example.sh
# add submodule to `monorepo/packages/mypackage` | |
cd monorepo/packages | |
git submodule add git@github.com:myorg/mypackage.git | |
# fresh clone of monorepo and fetch submodules | |
git clone --recurse-submodules --remote-submodules git@github.com:myorg/monorepo.git | |
# if already cloned, then fetch submodules | |
git submodule update --init --recursive |
NewerOlder