Skip to content

Instantly share code, notes, and snippets.

View jonatack's full-sized avatar

Jon Atack jonatack

View GitHub Profile
@jonatack
jonatack / bitcoin-test-pr-15750.md
Last active April 21, 2019 16:59
Manual test of bitcoin/bitcoin PR 15750

Manual tests of master (at 66ce95a) versus bitcoin/bitcoin#15750 (at b4338c1) compiling from source and launching src/bitcoind -deprecatedrpc=validateaddress:

(master)$ src/bitcoin-cli getaddressinfo 33wjMTPWcmF12zfQZ2ecuvQfpfZjgVQ4ag
{
  "address": "33wjMTPWcmF12zfQZ2ecuvQfpfZjgVQ4ag",
  "scriptPubKey": "a91418b8a89d71daba341f2ba4dac25ad08c7f91d72a87",
  "ismine": true,
  "solvable": true,
@jonatack
jonatack / bitcoin-fuzzing.md
Created April 12, 2019 14:11
bitcoin fuzzing
/bitcoin/src# $AFLPATH
/afl-2.52b: Is a directory

/bitcoin/src# $AFLOUT
/qa-assets/outputs: Is a directory

/bitcoin/src# $DIR_FUZZ_IN
/qa-assets/fuzz_seed_corpus: Is a directory

Keybase proof

I hereby claim:

  • I am jonatack on github.
  • I am jonatack (https://keybase.io/jonatack) on keybase.
  • I have a public key ASCaeU38EDbcgqP2Wb2r3yZfg1IlWpLxKk99zYCGoq9xbQo

To claim this, I am signing this object:

@jonatack
jonatack / trezor_recovery.py
Created August 16, 2017 17:41 — forked from mflaxman/trezor_recovery.py
Proof you can recover your Trezor funds without a Trezor (if it breaks and/or the company goes out of business)
from bitmerchant.wallet import Wallet
from mnemonic import Mnemonic
# put in whatever Trezor generates for you here (or backup from this empty/insecure one as a test)
mnemonic = 'clean health food open blood network differ female lion eagle rough upon update zone antique defense venture uncover mobile charge actress film vocal enough'
passphrase = '' # empty string or whatever you actually choose
path = "m/44'/0'/0'/0/0" # whatever shows up on the UI for that account (everything will start with m/44'/0' since it's bip44)
child = Wallet.from_master_secret(Mnemonic('english').to_seed(mnemonic, passphrase)).get_child_for_path(path)
child.to_address() # '18K9axbPpwqZgngB58nuwsYevL2z6ey4YG' (confirm this matches what Trezor is showing you)
require 'json'
require 'uri'
require 'net/http'
require 'net/https'
##
# Poloniex Ruby API interface
#
# Documentation text is pretty much 1:1 from the official API documentation
# https://www.poloniex.com/support/api
# test-ransack-scope-and-column-same-name.rb
# This is a stand-alone test case.
# Run it in your console with: `ruby test-ransack-scope-and-column-same-name.rb`
# If you change the gem dependencies, run it with:
# `rm gemfile* && ruby test-ransack-scope-and-column-same-name.rb`
unless File.exist?('Gemfile')
# test-ransacker-arel-present-predicate.rb
# Run it in your console with: `ruby test-ransacker-arel-present-predicate.rb`
# If you change the gem dependencies, run it with:
# `rm gemfile* && ruby test-ransacker-arel-present-predicate.rb`
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
# test-ransack-scope-and-column-same-name.rb
# This is a stand-alone test case.
# Run it in your console with: `ruby test-ransack-scope-and-column-same-name.rb`
# If you change the gem dependencies, run it with:
# `rm gemfile* && ruby test-ransack-scope-and-column-same-name.rb`
unless File.exist?('Gemfile')
@jonatack
jonatack / test-ransack-issue-608-order-of-predicate-arguments.rb
Last active July 30, 2016 13:45
test-ransack-issue-608-order-of-predicate-arguments
# test-ransack-issue-608-order-of-predicate-arguments.rb
# This is a stand-alone test case.
# Run it in your console with: `ruby test-ransack-issue-608-order-of-predicate-arguments.rb`
# If you change the gem dependencies, run it with:
# `rm gemfile* && ruby test-ransack-issue-608-order-of-predicate-arguments.rb`
unless File.exist?('Gemfile')
@jonatack
jonatack / two_associations_one_with_default_scope.rb
Last active July 30, 2016 13:43
Ransack issue #628 - two associations where the second one is part of the default scope generates invalid SQL.
# two_associations_one_with_default_scope.rb
# Run it in your console with: `ruby two_associations_one_with_default_scope.rb`
# If you change the gem dependencies, run it with:
# `rm gemfile* && ruby two_associations_one_with_default_scope.rb`
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'