Skip to content

Instantly share code, notes, and snippets.

Wladimir J. van der Laan laanwj

  • The Netherlands
Block or report user

Report or block laanwj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View host_icons.example
{"host":"", "icon":"red.png"},
{"host":"", "icon":"green.png"},
{"host":"", "icon":"yellow.png"},
{"host":"", "icon":"orange.png"},
{"host":"", "icon":"blue.png"},
{"host":"", "icon":"cyan.png"},
laanwj / hexstr_benchmarks.cpp
Created Apr 21, 2012
Bitcoin HexStr benchmarks
View hexstr_benchmarks.cpp
// g++ -O2 hexstr_benchmarks.cpp -o hexstr_benchmarks
#include <stdio.h>
#include <vector>
#include <string>
#include <stdarg.h>
#include <time.h>
#include <string.h>
using namespace std;
#define loop for (;;)
laanwj / bignum_setcompact.cpp
Created Sep 21, 2012
Checks for all 32 bit integers whether SetCompactNew(x) == SetCompactOld(x)
View bignum_setcompact.cpp
// g++ bignum_setcompact.cpp -o ./bignum_setcompact -lcrypto -O3
// Checks for all 32 bit integers whether SetCompactNew(x) == SetCompactOld(x)
#include <limits>
#include <stdexcept>
#include <vector>
#include <openssl/bn.h>
#include <algorithm>
#include <assert.h>
#include <sys/types.h>
laanwj / haskell-unicode.sublime-keymap
Created Sep 22, 2012
Haskell unicode syntax key bindings for Sublime Text 2
View haskell-unicode.sublime-keymap
{ "keys": [":",":"], "command": "insert_snippet", "args": {"contents": ""}, "context":
{ "key": "selector", "operator": "equal", "operand": "source.haskell" }
{ "keys": ["-",">"], "command": "insert_snippet", "args": {"contents": ""}, "context":
{ "key": "selector", "operator": "equal", "operand": "source.haskell" }
View gist:4464490
[seq 0] [thread 0] in={
.command = gcvHAL_GET_BASE_ADDRESS,
.u = {
[seq 1] [thread 0] out={
.command = gcvHAL_GET_BASE_ADDRESS,
.status = gcvSTATUS_OK,
.u = {
.GetBaseAddress = {
laanwj / texinfo_kobo.tex
Created Jun 14, 2013
Texinfo.tex configuration for generating PDFs readable with Kobo Glo 6" screen size
View texinfo_kobo.tex
\def\afivepaper{{\globaldefs = 1
\parskip = 2pt plus 1pt minus 0.1pt
\textleading = 12.5pt
\lispnarrowing = 0.2in
\tolerance = 800
View float3_mul_default.bin
MOV t0.x___, void, void, t0.xxxx
MOV t0._y__, void, void, t0.xxxx
BRANCH.GE void, t0.yyyy, u0.zzzz, label_20 ; !bit_1_21=1! !bit_2_30=2!
LSHIFT t0._y__, t0.xxxx, void, u0.wwww ; !bit_2_30=1!
LOAD t1._yzw, u0.xxxx, t0.yyyy, void
MOV t0._yzw, void, void, t1.yyzw
LSHIFT t2.x___, t0.xxxx, void, u0.wwww ; !bit_2_30=1!
LOAD t1.xyz_, u0.xxxx, t2.xxxx, void
MOV t2.xyz_, void, void, t1.xyzz
MUL t3.xyz_, t0.yzww, t2.xyzz, void
# Copyright (c) 2013 W.J. van der Laan
# parts sourced from jackjack's (
# Distributed under the MIT/X11 software license
from bitcoin.base58 import CBase58Data
from binascii import b2a_hex, a2b_hex
import struct
import hashlib
import scrypt, random
from Crypto.Cipher import AES
laanwj / gist:8580481
Created Jan 23, 2014
Windows Qt 5.2.0 Qt5Gui.pc
View gist:8580481
Name: Qt5 Gui
Description: Qt Gui module
Version: 5.2.0
Libs: -L${libdir} -lQt5Gui
laanwj / sendalert.cpp
Last active Jul 9, 2018
Bitcoin send alert code
View sendalert.cpp
So you need to broadcast an alert...
... here's what to do:
1. Copy sendalert.cpp into your bitcoind build directory
2. Decrypt the alert keys
copy the decrypted file as alertkeys.h into the src/ directory.
3. Modify the alert parameters in sendalert.cpp
You can’t perform that action at this time.