Skip to content

Instantly share code, notes, and snippets.

View rubensayshi's full-sized avatar

Ruben de Vries rubensayshi

  • Amsterdam, Netherlands
View GitHub Profile
@rubensayshi
rubensayshi / README.md
Created June 1, 2016 15:21
JetBrains Clion IDE Ethereum / Solidity setup

Set CMake Args to: -DGUI=0 -DEVMJIT=0 -DETHASHCL=0

@rubensayshi
rubensayshi / raid1 CDs
Created April 22, 2016 22:12
weakauras
dGKHxbqjQuvJsfDkvyviHxHsAwa1Tau7Iq1VqIYWqsogbldiptLOPrLqUgskBdjvFJkrJdLOZHsP3HeH7HeP9rLqrheLIfsr6HQK0erIQ6IeInIs4JuPkJuLeNejQYkPOEjvcLMjvQSta(jvcvnucLLQsQNk1uPWvrIOTsLqLVsLqHXsLYzPsAVq)fLQbRCyIwmH0Jvvtwv6YG2mv0NrXOPcNMKxRsWSPQBRsTBk9BsnCvXYr8CunDjxhP2ovc(ofX4vj05bK1Jev2VyuanWwIgyHnhBqIliovIdI6yFJ9l2VOb2meTjyFnLN7DfdSVOlENo5WczbWSKkx6IyPa1PUa1OUaixeiQqNa7ICrylFFvLsBLE2lIIHbs4ObwytGmkT1aOhi2VazL3Qpdrt)Gn8Ips7l8fffB1l2eP6vitKlwqIv6ZUkLp2CO3PyALTW2DIWcdSnr9woqautqaBl9TbrXWajCeGa2oGkghfYcxe1O6sQt1LSfeOlV0LUKTGqNa7ICj2ET8fnWUKEOTqdSVP9LcnWclSFvoDQ(0(ci0a7BAFPqdSWcBI8drdSVP9LcnWclSDk)LsBrdSVP9LcnWclSP5q2)EjNJIInr7HOb230(sHgyHfwydKlENo5WcbaSGGlclS)ObcqanW(vXF8sGmGxSW29TytGmkT1aOhi2f8If202IOyyGe0aBAoKD(d8RCQ(StBvfAk20wvHnrQEfWcB1l2eP6vitKlwqIv6ZUkLFga5neBtuVLdKfu7swEjiQy5LSfKlbr1LS0fHob2frnSLVVQsPTsp7frXWajC0alST03gefddKWracy7aQyCuilOUlPg1U0LuJLcS0LxsnQlqD0jWUi2ITxlFrdSFvoDQ(0(ci0a7BAFPqdSWcBI2drdS5klJhI9veHnUtKRX(M2xk0a7RicBCNixJMIfwyxsp0wOb230(sHgyHf2oL)sPTOb230(sHgyHf2e5hIgyFt7lfAGfwyHDrummqcAGnnhYUdO0xoqrX2bu6lhSR
@rubensayshi
rubensayshi / install.sh
Last active April 14, 2016 20:56
Counterparty Custom Install
apt-get -y install runit software-properties-common python-software-properties git-core wget \
python3 python3-setuptools python3-dev python3-pip build-essential python3-sphinx python-virtualenv libsqlite3-dev python3-apsw python3-zmq
cd /where/your/projects/code/is
sudo echo "" # so that you won't get prompts during `python setup.py install_serpent` which messes up copy pasting this stuff
git clone [email protected]:CounterpartyXCP/counterparty-lib.git
cd counterparty-lib
git checkout develop
@rubensayshi
rubensayshi / gist.md
Last active May 2, 2024 04:00
Bitcoin Script Overview

rundown of different scripts and what is what and what goes where.

  • the prevoutScript is the script of the output being spend
  • the redeemScript is the script that is used to solve the P2SH
  • the signatureScript is the script that is taken into the signatureHash for signing
  • the witnessRedeemScript is the script that is used to solve the P2WSH
  • the scriptSig is what goes into the input.scriptSig when serializing the TX
  • the witnessScript is what goes into the input.witness when serializing the TX

for a P2KH

var blocktrail = require('blocktrail-sdk');
var bitcoin = require('bitcoinjs-lib');
var async = require('async');
var _ = require('lodash');
var client = blocktrail.BlocktrailSDK({
apiKey : process.env.BLOCKTRAIL_SDK_APIKEY || "YOUR_APIKEY_HERE",
apiSecret : process.env.BLOCKTRAIL_SDK_APISECRET || "YOUR_APISECRET_HERE"
});
<?php
/**
* example script to receive webhook events for a wallet and forward the bitcoin to another address (by the mapping)
*/
use BitWasp\BitcoinLib\RawTransaction;
use Blocktrail\SDK\Blocktrail;
use Blocktrail\SDK\BlocktrailSDK;
use Blocktrail\SDK\Connection\Exceptions\ObjectNotFound;
max is [1000000b]
doubling when 50% is > [900000b]
halving when 90% is < [500000b]
max [1000000] height [0] cnt [2000] avg size [224b] 0% > [900000b] 100% < [500000b]
HALVING!
max is [500000b]
doubling when 0.5% is > [450000b]
halving when 0.9% is < [250000b]
max [500000] height [2016] cnt [2000] avg size [225b] 0% > [450000b] 100% < [250000b]
HALVING!
@rubensayshi
rubensayshi / fill-height-or-more.scss
Created August 26, 2015 15:05
fill-height-or-more.scss
.fill-height-or-more {
min-height: 100%;
display: flex;
flex-direction: column;
> div {
// these are flex items
// flex: 1; same as:
// flex-grow: 1;
@rubensayshi
rubensayshi / keybase.md
Created August 6, 2015 12:22
keybase.md

Keybase proof

I hereby claim:

  • I am rubensayshi on github.
  • I am rubensayshi (https://keybase.io/rubensayshi) on keybase.
  • I have a public key whose fingerprint is F478 BE67 9D32 0E99 E463 8170 00DA 522E 6698 AA71

To claim this, I am signing this object:

[katy][11:16:29] (blocktrail-v0.10.1a) /work/bitcoin$ bitcoin-cli -testnet getpeerinfo | grep -B3 "484633" | grep "subver"
"subver" : "/Satoshi:0.9.3/",
"subver" : "/Satoshi:0.9.3/",
"subver" : "/Satoshi:0.9.3/",
"subver" : "/Satoshi:0.8.6/",
"subver" : "/Satoshi:0.9.3/",
"subver" : "/Satoshi:0.9.4/",
"subver" : "/Satoshi:0.9.3/",
"subver" : "/Satoshi:0.10.0/",
"subver" : "/Satoshi:0.9.2.1/",