This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TZ=JST-9 date -Iseconds|tr T ' '|tr - /|head -c 19 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: btc bitcoin_amount_in_satoshi | |
# $ btc 1550000000 | |
# 15.50000 BTC | |
# | |
function btc { | |
if [[ -n $1 ]]; then | |
btc=$(bc -l <<< "$1 / 100000000.0") | |
printf '%.5f BTC\n' $btc | |
fi | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::Write; | |
use std::net::{TcpListener, TcpStream}; | |
use std::thread; | |
fn handle_client(mut stream: TcpStream) { | |
thread::spawn(move || { | |
stream.write(b"Hello World\r\n").unwrap(); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Requirements: geth | |
fee=$(geth attach ipc:/home/ubuntu/main_net/geth.ipc --exec 'web3.fromWei(web3.eth.gasPrice*web3.eth.estimateGas({from:"0xc1912fee45d61c87cc5ea59dae31190fffff232d"}))') | |
date | |
echo -n $fee | tr -d \" | |
echo \ ETH. |
OlderNewer