Skip to content

Instantly share code, notes, and snippets.

Avatar

Nguyen Sy Thanh Son thanhson1085

View GitHub Profile
View create_dns_record_cloudflare.sh
#!/bin/bash
for i in {004..005}
do
A='{"type":"A","name":"'
B='","content":"xxxx","ttl":120,"priority":10,"proxied":true}'
DATA="${A}${i}${B}"
curl -X POST "https://api.cloudflare.com/client/v4/zones/xxx/dns_records" \
-H "X-Auth-Email: admin@tomochain.com" \
-H "X-Auth-Key: xxx" \
View git-specify-ssh-key.sh
ssh-agent bash -c 'ssh-add ./tmp_key; git push origin devnet -f'
View detect-large-file.sh
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see https://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
# set the internal field separator to line break, so that we can iterate easily over the verify-pack output
View certbot.sh
wget https://dl.eff.org/certbot-auto
chmod +x certbot-auto
mv certbot-auto /usr/bin/certbot
certbot -d [domain]
crontab -e
0 5 * * 1 /usr/bin/certbot -q renew --post-hook "systemctl reload nginx"
View tomox.sh
#!/bin/bash
cd /tmp && git clone https://github.com/tomochain/tomox-quickstart.git
cd tomox-quickstart && bash setup.sh
View tomochain_blacklist.txt
0x5248bfb72fd4f234e062d3e9bb76f08643004fcd
0x5ac26105b35ea8935be382863a70281ec7a985e9
0x09c4f991a41e7ca0645d7dfbfee160b55e562ea4
0xb3157bbc5b401a45d6f60b106728bb82ebaa585b
0x741277a8952128d5c2ffe0550f5001e4c8247674
0x10ba49c1caa97d74b22b3e74493032b180cebe01
0x07048d51d9e6179578a6e3b9ee28cdc183b865e4
0x4b899001d73c7b4ec404a771d37d9be13b8983de
0x85cb320a9007f26b7652c19a2a65db1da2d0016f
0x06869dbd0e3a2ea37ddef832e20fa005c6f0ca39
View trc21.js
/*
* RPC: https://rpc.tomochain.com mainnet, https://testnet.tomochain.com testnet
* chainId: 88 mainnet, 89 testnet
*/
const Web3 = require('web3')
const rpc = 'https://testnet.tomochain.com'
const chainId = 89
const pkey = 'YOUR_PKEY' // token holder pkey
View trc20.js
/*
* RPC: https://rpc.tomochain.com mainnet, https://rpc.testnet.tomochain.com testnet
* chainId: 88 mainnet, 89 testnet
*/
const Web3 = require('web3')
const rpc = 'https://rpc.testnet.tomochain.com'
const chainId = 89
const pkey = 'YOUR_PKEY' // token holder pkey
View staking_tomochain.js
/*
* RPC: https://rpc.tomochain.com mainnet, https://testnet.tomochain.com testnet
* chainId: 88 mainnet, 89 testnet
* Owner address: balance at least 50000 TOMO
* Coinbase is node address. You can create a empty wallet with https://wallet.testnet.tomochain.com
*/
const rpc = 'https://testnet.tomochain.com'
chainId = 89
const pkey = '[OWNER_PKEY]' // include 0x
You can’t perform that action at this time.