Skip to content

Instantly share code, notes, and snippets.

View RandyMcMillan's full-sized avatar
🛰️
Those who know - do not speak of it.

@RandyMcMillan RandyMcMillan

🛰️
Those who know - do not speak of it.
View GitHub Profile
[
"ed1d0e1f743a7d19aa2dfb0162df73bacdbc699f67cc55bb91a98c35f7deac69",
"fd3fdb0d0d8d6f9a7667b53211de8ae3c5246b79bdaf64ebac849d5148b5615f",
"e668a111aa647e63ef587c17fb0e2513d5c2859cd8d389563c7640ffea1fc216",
"1bbb8324577ac089607e45813bac499ebdab4621d029f8c02b2c82b4410fd3f4",
"51535ad9f0e13a810f73ea8829a79b3733bd1fffb767c4885990b02f59103a13",
"2508ed2c2ab3f6728a880fafbc0895a2afeacbb74eb69847255fb60564af0d85",
"3707f1efc7515524dce41d3bf50bfd9fdaed3494620b5f94fcf16d2766da4ec2",
"dbab9040bc1f0c436b0f92f517702498358edc1fde2c7884d0e1036c739d44f3",
"ad5aab5be883a571ea37b231cd996d37522e77d0f121cedfd6787b91d848268e",
@RHDZMOTA
RHDZMOTA / complex-python-lambdas.py
Created December 14, 2021 05:07
An updated version of George Lydakis python script on lambda functions: http://ldkge.com/complex-python-lambdas.html
_ = (
lambda: [
_
# Imports
for sys in [__import__('sys')]
for math in [__import__('math')]
# Helper functions
for sub in [lambda *vals: None]
for fun in [lambda *vals: vals[-1]]
@RandyMcMillan
RandyMcMillan / DOCS.md
Last active September 12, 2022 21:58
GNUmakefile example

GNUmakefile example

@igorvanloo
igorvanloo / p618.py
Created July 28, 2021 18:29
Problem 618
def compute(limit):
d = [1] + [0] * limit
primes = eulerlib.primes(limit)
mod = 10**9
Fibonnaci_numbers = [2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368]
for p in primes:
for i in range(p,limit+1):
d[i] += (p*d[i-p] % mod)
@Kixunil
Kixunil / efficient_reusable_taproot_addresses.md
Last active April 14, 2023 22:07
Efficient reusable Taproot addresses

Reusable taproot addresses

Abstract

This document proposes a new scheme to avoid address reuse while retaining some of the convenience of address reuse, keeping recoverability purely from Bitcoin time chain and avoiding visible fingerprint. The scheme has negligible average overhead.

Motivation

@LarryRuane
LarryRuane / bitcoin-core-debugging.md
Last active March 27, 2023 12:59
Some tips and tricks for debugging Bitcoin Core

Using debuggers with Bitcoin Core

Please also refer to Fabian Jahr's excellent documentation and video. In this document, I'll cover only some of what his document does in slightly greater detail, while trying not to duplicate too much, and focused on gdb and Linux.

Video version of (most of) this document: https://vimeo.com/576956296/df0b66fbfc NOTE if you watch the video: Near the end, I had problems attaching to

@hebasto
hebasto / alpine.md
Last active May 1, 2024 18:26
Building Bitcoin Core with GUI on Alpine Linux

Building Bitcoin Core with GUI on Alpine Linux

System

$ cat /etc/alpine-release
3.13.5

Bitcoin Core repository

@hebasto
hebasto / guix-sigs.md
Last active March 28, 2024 10:11
The `bitcoin-core/guix.sigs` Repository Workflow

The bitcoin-core/guix.sigs Repository Workflow

Common environment variables

export SIGNER="hebasto"
export GUIX_SIGS_REPO="/home/hebasto/guix.sigs"
export DETACHED_SIGS_REPO="/home/hebasto/bitcoin-detached-sigs"
// Heavily based on ideas from https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/lj_opt_fold.c
// The most fundamental deviation is that I eschew the big hash table and the lj_opt_fold()
// trampoline for direct tail calls. The biggest problem with a trampoline is that you lose
// the control flow context. Another problem is that there's too much short-term round-tripping
// of data through memory. It's also easier to do ad-hoc sharing between rules with my approach.
// From what I can tell, it also isn't possible to do general reassociation with LJ's fold engine
// since that requires non-tail recursion, so LJ does cases like (x + n1) + n2 => x + (n1 + n2)
// but not (x + n1) + (y + n2) => x + (y + (n1 + n2)) which is common in address generation. The
// code below has some not-so-obvious micro-optimizations for register passing and calling conventions,
// e.g. the unary_cse/binary_cse parameter order, the use of long fields in ValueRef.