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 / 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
Blisters
* eVayl
* Neph Bolt Thrower
Unpainted
* Thagrosh
* Epic Thagrosh
* Absolonia
* Searyn
* eLylith
@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
@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 / 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 / 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 / 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 / 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:

var bitutil = require('bitcore/util/util');
// ouput being spend: http://blockexplorer.com/tx/a4bfa8ab6435ae5f25dae9d89e4eb67dfa94283ca751f393c1ddc5a837bbc31b#o0
// taken from http://blockexplorer.com/tx/09f691b2263260e71f363d1db51ff3100d285956a40cc0e4f8c8c2c4a80559b1
var input = "0100000000000000000000000000000000000000000000000000000000000000000000003BA3EDFD7A7B12B27AC72C3E67768F617FC81BC3888A51323A9FB8AA4B1E5E4A29AB5F49FFFF001D1DAC2B7C"
bitutil.twoSha256(input) // why isn't this 6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000 ?
/**
* Copyright (c) 2013 Xcellent Creations, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions: