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 / keybase.md
Created April 12, 2014 16:07
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 56B2 E936 4D39 5E72 1E07 6B13 8358 A537 FA57 6C5A

To claim this, I am signing this object:

@rubensayshi
rubensayshi / bitcoind.sh
Created April 12, 2014 16:15
bitcoind install
#!/bin/bash
# Word of caution, I am not an experienced shell programmer. All I can #
# guarantee is that this script has worked for me, and that it has #
# done so on multiple Ubuntu machines (one 11.10 and one 13.10), so #
# hopefully it will work for you too #
# Install some packages as instructed on various web sites
sudo apt-get -y install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev
sudo apt-get -y install libtool autotools-dev autoconf
@rubensayshi
rubensayshi / nginx.conf
Last active August 29, 2015 13:59
nginx localhost
user www-data;
worker_processes 2;
pid /run/nginx.pid;
events {
worker_connections 768;
multi_accept on;
user epoll;
}
@rubensayshi
rubensayshi / dev.php
Created May 2, 2014 13:55
PHP, how I've missed you xD
<?php
$a = array("boaz", "ruben", "jop");
echo json_encode($a); // ["boaz","ruben","jop"]
unset($a[1]);
echo json_encode($a); // {"0":"boaz","2":"jop"}
@rubensayshi
rubensayshi / gist:7cad6794742132074938
Last active August 29, 2015 14:01
[bounty] we're crowdsourcing our t-shirt slogan - 100k Dogecoin for the best slogan

We're looking for a fun, nerdy slogan to put on the front of our new company t-shirts that we'll be wearing on the #bitcoin2014 conference.

BlockTrail is working on a better, more advanced Blockexplorer than what the Cryptocurrency space currently has to offer, we want to have Bitcoin and Dogecoin (and maybe some others) in our first (beta) release.

I think it's obvious why we ask the Doge community for coming up with a cool slogan :D

How does it work?
Post your idea(s) here obviously! The best idea will recieve much Doge (100k) and a free t-shirt once they're printed :D
We have to get them printed monday, so that's when we'll decide on a winner!

@rubensayshi
rubensayshi / CMakeError.log
Created July 4, 2014 16:08
hhvm newrelic :-(
Performing C++ SOURCE FILE Test IS_AARCH64 failed with the following output:
Change Dir: /root/hhvm/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec2726913776/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec2726913776.dir/build.make CMakeFiles/cmTryCompileExec2726913776.dir/build
make[1]: Entering directory `/root/hhvm/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /root/hhvm/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec2726913776.dir/src.cxx.o
/usr/bin/c++ -DIS_AARCH64 -o CMakeFiles/cmTryCompileExec2726913776.dir/src.cxx.o -c /root/hhvm/CMakeFiles/CMakeTmp/src.cxx
/root/hhvm/CMakeFiles/CMakeTmp/src.cxx:3:2: error: #error Not ARMv8
Blisters
* eVayl
* Neph Bolt Thrower
Unpainted
* Thagrosh
* Epic Thagrosh
* Absolonia
* Searyn
* eLylith
@rubensayshi
rubensayshi / gist:1f9103b952d79b4c0646
Created August 22, 2014 18:02
redis is amazing <3
# 100mil 'entities'
# need to be able to check from a random subset if 'something' is TRUE or FALSE
# set booleans in a redis bitmap where the ID for the entities are the offset
$ redis-cli
> SETBIT mybitmap 100000000 1 # 8ms
> SETBIT mybitmap 99999999 1 # 2ms
> SETBIT mybitmap 10000000 1 # 2ms, etc
<?php
$gmp_mod2 = "114707950473724689011738672834614641175224213254516740956669650297796849798169";
$this->assertEquals("fd9a66324c8338b5ea4cc4568386ff87af448cb8a7b64692ccab4fb4ed478c19", gmp_strval(gmp_init($gmp_mod2), 16)); // OK
$this->assertEquals("fd9a66324c8338b5ea4cc4568386ff87af448cb8a7b64692ccab4fb4ed478c19", gmp_strval($gmp_mod2, 16)); // OK with php, FAIL with hhvm
<?php
use BitWasp\BitcoinLib\BitcoinLib;
require_once(__DIR__. '/vendor/autoload.php');
$bitcoin_livenet_normal = '1dice8EMZmqKvrGE4Qc9bUFf9PX3xaYDp';
$bitcoin_testnet_p2sh = '2N954bXdCyZM7bGG81tiEfZbXK1tcRgGWhX';