Skip to content

Instantly share code, notes, and snippets.

View salessandri's full-sized avatar

Santiago Alessandri salessandri

View GitHub Profile
@salessandri
salessandri / s3-backup-lnd-channels-backup.py
Created February 24, 2025 04:08
Script tailored to backup to S3 the channels.backup file generated by lnd each time it changes
#!/usr/bin/env python3
"""
LND Channels Backup Service
==========================
A service specifically designed to backup the channels.backup file generated by LND (Lightning
Network Daemon). The service is tailored to LND's update mechanism, where it creates a new
backup file and then moves it to replace the existing channels.backup, ensuring atomic updates.
@salessandri
salessandri / gandi-ddns.py
Created May 29, 2023 01:11
Update A Gandi LiveDNS A Record with the external IP
#!/bin/env python3
import argparse
import logging
import requests
def get_external_ip() -> str:
GET_IP_URL = 'https://ifconfig.me/ip'
@salessandri
salessandri / Findjsoncpp.cmake
Last active December 11, 2017 19:03
CMake find module for jsoncpp
#.rst:
# Findjsoncpp
# --------
#
# Find jsoncpp
#
# Find the jsoncpp headers and libraries.
#
# ::
#

Keybase proof

I hereby claim:

  • I am salessandri on github.
  • I am salessandri (https://keybase.io/salessandri) on keybase.
  • I have a public key whose fingerprint is 3046 8237 EA45 74E7 D814 AA0A DB3A 1A87 4658 CFAE

To claim this, I am signing this object:

@salessandri
salessandri / TransactionManagerArchitecturePoC.cpp
Created November 2, 2016 05:33
Proof of concept of how to design the architecture to handle transactions in C++
#include <atomic>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <mutex>
#include <thread>
#include <boost/optional.hpp>