Skip to content

Instantly share code, notes, and snippets.


Sander sanderfoobar

  • Sofia, Bulgaria
View GitHub Profile
View debounce.h
// from:
// usage:
// std::function<void()> new_func = Debounce([=]{
// qDebug() << "fired";
// }, 500);
// new_func();
// new_func();
sanderfoobar /
Last active Jul 9, 2020
Keycloak + flask simple login example
$ pip install requests flask flask-session
Please note you will need a `CLIENT_ID` and `CLIENT_SECRET`.
Keycloak's access type set to 'confidential'
sanderfoobar /
Last active Oct 28, 2020
Host an I2P monerod node

Hosting a Monero p2p node on I2P

This document serves as a small tutorial for new and/or existing Monero node operators who wish to support I2P users by allowing their nodes to communicate p2p through I2P.

You should be able to get through this document and host an I2P node in ~20 minutes.


  • Linux system, can be behind a firewall (i.e: home network)
  • Latest monero (CLI) release: link
sanderfoobar / CMakeLists.txt
Created Jun 5, 2019
CMake recipe monero GUI
View CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(monero-gui C CXX)
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
View nana.diff
diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c
index 9b894059..dd1a7ffd 100644
--- a/src/http/ngx_http_header_filter_module.c
+++ b/src/http/ngx_http_header_filter_module.c
@@ -53,7 +53,21 @@ static u_char ngx_http_server_build_string[] = "Server: " NGINX_VER_BUILD CRLF;
static ngx_str_t ngx_http_status_lines[] = {
- ngx_string("200 OK"),
+ ngx_string(u8"200 NANANANAANANANA OK "
sudo apt-get build-dep
apt-get source [...]
cd [...]
DEB_CFLAGS_APPEND="-fPIC" DEP_CXXFLAGS_APPEND="-fPIC" DEB_CPPFLAGS_APPEND="-fPIC" dpkg-buildpackage -B -us -uc -j3 -rfakeroot

Keybase proof

I hereby claim:

  • I am xmrdsc on github.
  • I am xmrdsc ( on keybase.
  • I have a public key whose fingerprint is 2862 2D20 C1CA 773F EED0 C8EC E29D FFCD D83E 51A6

To claim this, I am signing this object:

sanderfoobar /
Last active Jun 30, 2019
Monero RPC node bandwidth monitoring

In this document, $YOUR_IP refers to your public ip address.

Keeping track of bandwidth for Monero RPC nodes

First, we must make a clear distinction between RPC traffic and P2P traffic. As a node operator you might think "wow my node is doing so much traffic WTF where are all these bytes coming from and going to". Well, this is actually due to your P2P port being exposed, which is port 18080. This document does not cover the monitoring of P2P traffic. This document is specifically for the RPC port which runs on 18081 (or 18089).

As Monero RPC traffic is HTTP, we can use nginx to reverse proxy and record bandwidth passing through. This implies that monerod's RPC port stays on localhost

Where normally we would use:

ssh -p 22 sudo tcpdump -i xxxx -U -w - not port 5900 | wireshark -i - -k
import sys
import os
from random import shuffle
from collections import OrderedDict
if not sys.version_info >= (3, 0):
print("python3 only")