Skip to content

Instantly share code, notes, and snippets.

View obale's full-sized avatar

Alex Oberhauser obale

View GitHub Profile
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::restic/locks",
Verifying my Blockstack ID is secured with the address 1H44vfwcrD4asrXcpaxBMzp2mVaoc36oo https://explorer.blockstack.org/address/1H44vfwcrD4asrXcpaxBMzp2mVaoc36oo
# Magic that computes a sha-256 hash for any content
crypto = require('crypto')
SHA256 = (data) ->
new Buffer(crypto.createHash('sha256').update(data).digest('binary'), 'binary')
# Hexadecimal representation of the Genesis Block
rawBlock = new Buffer('5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c945641d57c3200000000ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 'hex')
# Computes the double SHA256 hash of the Genesis Block
blockId = SHA256(SHA256(rawBlock.toString('hex')))
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| MagicNo (blockchain identifier) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|C|Pay-|Chec| Payload of dynamic length, e.g. |
|M|load|ksum| block, transaction or primitive value |
|D|Size| | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@obale
obale / version_transaction.txt
Created May 23, 2015 15:56
A blockchain protocol VERSION message.
0000: 9595 c9df 9007 5148 eb06 8603 65df 3358 ..I_..QHk...e_3X
0010: 4b75 bff7 82a5 10c6 cd48 83a4 1983 3d50 Ku?w.%.FMH.$..=P
0020: 0000 0000 146b c383 fdff ffff ff00 0000 .....kC.}.......
0030: 0000 0000 0041 d553 2c1b 8000 00 .....AUS,....
Message Header:
9595 c9df 9007 5148 eb06 8603 65df 3358
4b75 bff7 82a5 10c6 cd48 83a4 1983 3d50 - Blockchain MagicNo
00 - VERSION command flag 0x00

Keybase proof

I hereby claim:

  • I am obale on github.
  • I am obale (https://keybase.io/obale) on keybase.
  • I have a public key whose fingerprint is 42BD F627 9D0A CE2B C0B0 B0CC 605E FE23 AEF6 4D47

To claim this, I am signing this object:

@obale
obale / changelog_tasks.rake
Created April 16, 2012 17:56
rake changelog
require "grit"
# This ChangeLog code works if you work on a 'develop' branch and if you merge only
# with the 'master' branch if you release a version. Each release (merge) should
# include also a creation of a tag.
#
# Sponsored by Sigimera (http://www.sigimera.org)
desc "Outputs the ChangeLog of the current release"
task :changelog do
repo = Grit::Repo.new('.')