Skip to content

Instantly share code, notes, and snippets.

@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
source 'https://rubygems.org'
gem 'gmail'
gem 'curb'
Empty Gist
@yebyen
yebyen / core0.database.log
Last active August 29, 2015 14:14
coreN.database.log
Jan 26 13:27:28 core0 sh[17850]: wal_e.main INFO MSG: starting WAL-E
Jan 26 13:27:28 core0 sh[17850]: DETAIL: The subcommand is "wal-push".
Jan 26 13:27:28 core0 sh[17850]: STRUCTURED: time=2015-01-26T13:27:28.077329-00 pid=14320
Jan 26 13:27:28 core0 sh[17850]: wal_e.worker.upload INFO MSG: begin archiving a file
Jan 26 13:27:28 core0 sh[17850]: DETAIL: Uploading "pg_xlog/000000020000000600000069" to "s3://db_wal/wal_005/000000020000000600000069.lzo".
Jan 26 13:27:28 core0 sh[17850]: STRUCTURED: time=2015-01-26T13:27:28.124389-00 pid=14320 action=push-wal key=s3://db_wal/wal_005/000000020000000600000069.lzo prefix= seg=000000020000000600000069 state=begin
Jan 26 13:27:28 core0 sh[17850]: wal_e.worker.upload INFO MSG: completed archiving to a file
Jan 26 13:27:28 core0 sh[17850]: DETAIL: Archiving to "s3://db_wal/wal_005/000000020000000600000069.lzo" complete at 3511.74KiB/s.
Jan 26 13:27:28 core0 sh[17850]: STRUCTURED: time=2015-01-26T13:27:28.393866-00 pid=14320 action=push-wal key=s3://db_wal
core@core8 ~ $ docker ps -a|grep 32913
0a3de971a0a0 192.168.4.55:5000/feline-lungfish:v6 "/runner/init start 17 minutes ago Up 17 minutes 0.0.0.0:32913->5000/tcp feline-lungfish_v6.web.1
core@core8 ~ $ curl localhost:32913
curl: (56) Recv failure: Connection reset by peer
core@core8 ~ $ nse feline-lungfish_v6.web.1
slug@0a3de971a0a0:~$ curl localhost:5000
<p>Read <a href="http://jekyllbootstrap.com/usage/jekyll-quick-start.html">Jekyll Quick Start</a></p>
<p>Complete usage and documentation available at: <a href="http://jekyllbootstrap.com">Jekyll Bootstrap</a></p>
@yebyen
yebyen / hosts
Last active May 4, 2016 23:41 — forked from romaninsh/swapon.service
Set up swap on CoreOS
create this file in your /root folder
$ fleetctl load swapon.service
$ fleetctl start swapon.service
This will create swap file on all nodes of your CoreOS cluster without prior setup.
See also http://cloudinit.readthedocs.org/en/latest/topics/examples.html#adjust-mount-points-mounted
@yebyen
yebyen / user-data.example.diff
Last active April 13, 2016 02:10
patch for deis/deis to create a swap file
diff --git a/contrib/coreos/user-data.example b/contrib/coreos/user-data.example
index 59f4f46..f8ed383 100644
--- a/contrib/coreos/user-data.example
+++ b/contrib/coreos/user-data.example
@@ -24,6 +24,31 @@ coreos:
command: start
- name: fleet.service
command: start
+ - name: swapon.service
+ command: start
2016-07-20T15:14:44UTC deis-database[1]: File "/usr/lib/python2.7/site-packages/boto/s3/bucket.py", line 715, in delete_keys2
2016-07-20T15:14:44UTC deis-database[1]: data=data)
2016-07-20T15:14:44UTC deis-database[1]: File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 668, in make_request
2016-07-20T15:14:44UTC deis-database[1]: retry_handler=retry_handler
2016-07-20T15:14:44UTC deis-database[1]: File "/usr/lib/python2.7/site-packages/boto/connection.py", line 1071, in make_request
2016-07-20T15:14:44UTC deis-database[1]: retry_handler=retry_handler)
2016-07-20T15:14:44UTC deis-database[1]: File "/usr/lib/python2.7/site-packages/boto/connection.py", line 1030, in _mexe
2016-07-20T15:14:44UTC deis-database[1]: raise ex
2016-07-20T15:14:44UTC deis-database[1]: timeout: timed out
2016-07-20T15:14:44UTC deis-database[1]:
Verifying my Blockstack ID is secured with the address 1BRXZJDp2Ktdw1DpeSZVwnZ3tvREZy6zzt https://explorer.blockstack.org/address/1BRXZJDp2Ktdw1DpeSZVwnZ3tvREZy6zzt
### Keybase proof
I hereby claim:
* I am yebyen on github.
* I am yebyen (https://keybase.io/yebyen) on keybase.
* I have a public key ASDQFfHQqp-Oj0vKRboInmhpujt5b0VHEFYyQFqzsO1Vngo
To claim this, I am signing this object: