Skip to content

Instantly share code, notes, and snippets.

source 'https://rubygems.org'
gem 'gmail'
gem 'curb'
@yebyen
yebyen / gist:6656475
Created September 22, 2013 03:42
How many blocks til TerraCoin next difficulty rally, my ASIC bros? 1382. (could be off by one)
#!/usr/bin/env bash
dfc=$(terracoind getdifficulty)
firstheight=$(terracoind getblockcount)
height=$firstheight
hsh=$(terracoind getblockhash $height)
while [ -n "$dfc" ]; do
#echo $hsh
newdfc=$(terracoind getblock ${hsh}|grep "$dfc")
#echo $newdfc
if [ -z "$newdfc" ]; then break; fi