Skip to content

Instantly share code, notes, and snippets.

@lontivero
lontivero / ConvertFilters.csproj
Last active January 29, 2019 07:56
Convert Wasabi client-side filters to binary
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NBitcoin" Version="4.1.1.73" />
</ItemGroup>
@lontivero
lontivero / wasabi-install.sh
Last active February 5, 2019 14:04
Wasabi Wallet Installer Script v1.0
set -e
wget https://github.com/zkSNACKs/WalletWasabi/releases/download/v1.1.0/WasabiLinux-1.1.0.tar.gz{,.asc}
gpg --keyserver pgp.mit.edu --recv-keys B4B72266C47E075E
gpg --verify WasabiLinux-1.1.0.tar.gz{.asc,}
tar -xf WasabiLinux-1.1.0.tar.gz
@lontivero
lontivero / bitdump.sh
Created March 26, 2019 18:23 — forked from altamic/bitdump.sh
dumps Bitcoin network traffic
#!/usr/bin/env sh
# bitdump.sh
#
# captures Bitcoin network traffic
SELF=`basename $0`
if [[ $1 = "" ]]; then
DEFAULT="en1"
@lontivero
lontivero / Mejoras.md
Last active April 18, 2019 14:07
Acciones de mejora

Acciones de mejora

  • Metodología de desarrollo,
  • Prácticas de ingeniería.

Comenzamos con las prácticas de ingeniería para luego avanzar en lo metodológico ya que las primeras puede implementarse en un plazo más corto y tienen por objetivo mejorar la calidad de los entregables. Comenzamos con la implementación de quality gates poco intrusivos (revisión de código, análisis estático de código y testing funcional)

Metodología de desarrollo

  • Daily meetings.
@lontivero
lontivero / Program.cs
Last active April 19, 2019 05:40
Get Bitcoin nodes on onion domains
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace seeds
{
@lontivero
lontivero / FilterCoinjoinCSV.csv
Last active May 2, 2019 04:07
Coinjoin bash lines
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 3.
cat WasabiCoinjoins.csv | grep bc1qs604c7jv6amk4cxqlnvuxv26hv3e48cds4m0ew > payments.csv
cat payments.csv | sort -u > uniq-payments.csv
cat uniq-payments.csv | grep -E "4\/[0-9]{1,2}\/19" | cut -f1,2,4,8,9 > april2019.csv
# cat uniq-payments.csv | cut -d"," -f8 | paste -sd+ | bc
@lontivero
lontivero / Monoid.cs
Last active July 15, 2020 14:58 — forked from reidev275/Monoid.cs
Monoid and Foldable for C#
public interface Monoid<A>
{
public A Empty => default(A);
A Append(A x, A y);
}
public static class Foldable
{
public static A Fold<A>(this IEnumerable<A> list, Monoid<A> M) =>
list.FoldMap(x => x, M);
@lontivero
lontivero / bundle.sh
Created August 3, 2020 05:03
Wasabi AppImage bundle
#!/bin/sh
set -e
rm -rf .AppDir
mkdir -p ./AppDir/usr/bin
dotnet publish \
--configuration Release
--force \
--output ./AppDir/usr/bin \
@lontivero
lontivero / WabiSabi.hs
Created August 3, 2020 18:17
WabiSabi toy impl in Haskell
module WabiSabi where
data GE = GE Integer Integer | Infinity
deriving Show
instance S.Semigroup GE where
(<>) = (⊕)
instance M.Monoid GE where
mempty = Infinity
@lontivero
lontivero / simul.py
Created August 10, 2020 16:07
Fee rates under mepool pressure simulation
import sys, random, math
def hours(hrs):
return hrs * minutes(60)
def minutes(mins):
return 60 * mins
def megabytes(mega):
return mega * 1024 * 1024