Skip to content

Instantly share code, notes, and snippets.

@laanwj
laanwj / manual.md
Last active February 2, 2022 22:30
synthv1 manual

SynthV1 manual

synthv1 is an old-school all-digital 4-oscillator subtractive polyphonic synthesizer with stereo fx. It is developed by rncbc aka Rui Nuno Capela.

The synthesizer consists of two identical "synths" with each two oscillators and associated filters and envelope controls. The outputs of these synths are mixed together for the final output.

Synth modules

Example getpeerinfo

{
    "id" : 3827,
    "addr" : "106.187.41.230:36085",
    "addrlocal" : ":8333",
    "services" : "0000000000000001",
    "lastsend" : 1409561285,
    "lastrecv" : 1409561233,

"bytessent" : 1803,

@laanwj
laanwj / merkl.py
Created September 24, 2014 08:53
Visualization of Satoshi's BuildMerkleTree for issue #4926
'''Visualization of Satoshi's BuildMerkleTree for issue #4926.
Usage: merkle.py <num>
'''
from __future__ import print_function, division
import itertools
def build_merkle_tree(num):
'''Build a Merkle tree according to Satoshi'''
vtx = [('%2i'%(x+1)) for x in range(num)]
@laanwj
laanwj / urbit_sniffer.py
Created November 30, 2014 08:57
Urbit UDP sniffer
#!/usr/bin/python3
# Copyright (c) 2014 Wladimir J. van der Laan, Visucore
# Distributed under the MIT software license, see
# http://www.opensource.org/licenses/mit-license.php.
'''
urbit UDP sniffer
Usage: urbit_sniffer.py [-p <port1>-<port2>,<port3>,...] [-i <interface>]
'''
import socket, struct, sys, io, argparse
@laanwj
laanwj / draft_paytohs.md
Last active August 29, 2015 14:11
Pay-to-HS BIP draft
BIP: XX
Title: Pay-to-hidden-service
Author: Wladimir J. van der Laan, Gregory Maxwell
Status: Draft
Type: Standards Track
Created: 2014-12-18

Table of Contents

@laanwj
laanwj / secp256k1_fe_mul_inner.txt
Last active August 29, 2015 14:14
IR expressions generated from secp256k1_fe_*_inner ARM assembly
loc_0000000000000000:
@32[(SP+0xFFFFFFFC)] = LR
@32[(SP+0xFFFFFFF8)] = R11
@32[(SP+0xFFFFFFF4)] = R10
@32[(SP+0xFFFFFFF0)] = R9
@32[(SP+0xFFFFFFEC)] = R8
@32[(SP+0xFFFFFFE8)] = R7
@32[(SP+0xFFFFFFE4)] = R6
@32[(SP+0xFFFFFFE0)] = R5
@32[(SP+0xFFFFFFDC)] = R4
@laanwj
laanwj / txblkutils.py
Created April 15, 2015 10:32
Bitcoin transaction and block surgery
#!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework import BitcoinTestFramework
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from util import *
import os
import shutil
@laanwj
laanwj / transifex_migrate_resource.py
Last active November 1, 2015 14:59
Transifex resource migration script
'''
Run the script providing the slug of the project and the slug of the old and new resource.
The new resource should already have been created.
Example:
Old resource slug: 'old'
New resource slug: 'new'
python migrate_project.py project old new
@laanwj
laanwj / git-merge-point
Created September 3, 2015 23:00
Find/show merge commits
#!/bin/bash
usage() {
echo "git-merge-point <commitid>"
exit 1
}
[ -n "$1" ] || usage
# Make sure we are in a git directory
git rev-parse --is-inside-work-tree >&- || exit $?