Skip to content

Instantly share code, notes, and snippets.

View hstove's full-sized avatar

Hank Stoever hstove

View GitHub Profile
;; Generate the p2sh redeem script for a multisig
(define-read-only (pubkeys-to-spend-script
(pubkeys (list 5 (buff 65)))
(m uint)
)
(concat (uint-to-byte (+ u80 m)) ;; "m" in m-of-n
(concat (pubkeys-to-bytes pubkeys) ;; list of pubkeys with length prefix
(concat (uint-to-byte (+ u80 (len pubkeys))) ;; "n" in m-of-n
0xae ;; CHECKMULTISIG
)))
@hstove
hstove / hankstoever-id.proof.txt
Created October 25, 2018 17:56
Blockstack proof
Verifying my Blockstack ID is secured with the address 1G8XTwZkUzu7DJYDW4oA4JX5shnW8LcpC2 https://explorer.blockstack.org/address/1G8XTwZkUzu7DJYDW4oA4JX5shnW8LcpC2
Verifying my Blockstack ID is secured with the address 1G8XTwZkUzu7DJYDW4oA4JX5shnW8LcpC2 https://explorer.blockstack.org/address/1G8XTwZkUzu7DJYDW4oA4JX5shnW8LcpC2
Verifying my Blockstack ID is secured with the address 1G8XTwZkUzu7DJYDW4oA4JX5shnW8LcpC2 https://explorer.blockstack.org/address/1G8XTwZkUzu7DJYDW4oA4JX5shnW8LcpC2
@hstove
hstove / keybase.md
Created December 19, 2017 23:51
Keybase

Keybase proof

I hereby claim:

  • I am hstove on github.
  • I am hstove (https://keybase.io/hstove) on keybase.
  • I have a public key ASBFHdyG8QXFmMkej0E-yJQPR10e-hFXmSeHeRLyZMXLUwo

To claim this, I am signing this object:

@hstove
hstove / open-in-arxiv-sanity.md
Last active December 23, 2018 18:49
Bookmarklet to open Arxiv paper on arxiv-sanity.com
@hstove
hstove / gist:2dbd8830d83b8782f67f
Created July 31, 2014 17:03
terraform test file
variable "heroku_api_key" {}
variable "heroku_app_name" {}
# Configure the Heroku provider
provider "heroku" {
email = "hstove@gmail.com"
api_key = "${var.heroku_api_key}"
}
# Create a new applicaiton
#Store('score') # undefined
#Store('score',1)
#Store('score') # 1
#Store('score','',-1) # expires
#Store('score') # undefined
#Store('score', 1) # 1
#Store('score', -> 2 ) # 1 only calls function if 'score' not found
#Store('score','',-1)
#Store('score', -> 2 ) # 2
console.log event._facilitators # => [undefined]
event._facilitators = _.compact(event._facilitators)
console.log _.compact(event._facilitators) # => []
console.log event._facilitators # => [undefined]
@hstove
hstove / template.rb
Last active August 26, 2017 07:33
A template I use for creating Ruby on Rails apps
gem "bootstrap-sass", '~> 3.3.3'
gem "cancan"
gem "jquery-turbolinks"
gem "haml-rails"
gem "awesome_print"
gem "google-analytics-rails"
gem "ejs"
gem "paper_trail"
gem "nokogiri"
gem "dalli"