Skip to content

Instantly share code, notes, and snippets.

View tolbrino's full-sized avatar
💭
on earth

Tino Breddin tolbrino

💭
on earth
View GitHub Profile
@tolbrino
tolbrino / hoprd-http-api-swagger-schema.diff
Last active February 13, 2024 10:47
Diff or Hoprd HTTP API v3 Swagger Schema between v2.0.8 and v2.1.0
--- hoprd-http-api-v3-schema-2.0.8.json.new 2024-02-13 11:28:06.214324978 +0100
+++ hoprd-http-api-v3-schema-2.1.0.json.new 2024-02-13 11:43:56.434889079 +0100
@@ -1,3369 +1,3055 @@
{
"openapi": "3.0.3",
- "servers": [
- {
- "url": "/api/v3"
- }
- ],
@tolbrino
tolbrino / restart.sh
Created April 28, 2023 06:55 — forked from diegoalzate/restart.sh
restart hoprd nodes on rpch
#!/bin/bash
# Make API request and extract the IP addresses from the "hoprd_api_endpoint" field
ips=( $(curl --silent --request GET --url https://staging.discovery.rpch.tech/api/v1/node?status=READY | jq -r '.[].hoprd_api_endpoint | sub("http://"; "") | sub(":[0-9]*$"; "")') )
# Path to SSH private key for authentication
private_key_path=".ssh/id_rsa"
# Loop through the remote hosts and run the script on each one
for ip in "${ips[@]}"
@tolbrino
tolbrino / check-gnosis-chain-head.sh
Created February 27, 2023 06:56
Helper script to check availability of a set of Gnosis RPC endpoints
#!/usr/bin/env bash
# exit on errors, undefined variables, ensure errors in pipes are not hidden
set -Eeuo pipefail
do_curl() {
local endpoint="${1}"
local start end timing
start="$(date +%s%3N)"
#!/usr/bin/env bash
set -Eeuo pipefail
msg() {
echo >&2 -e "${1-}"
}
usage() {
msg
@tolbrino
tolbrino / measure_ae_sync.sh
Created August 7, 2019 11:35
Testing sync performance of the aeternity node
#!/usr/bin/env bash
set -e
FOLDER="$1"
OUTPUT_FILE="${OUTPUT_FILE:-blocks_synced.csv}"
check() {
if [[ -z "${FOLDER}" ]]; then
echo "ERROR: Specify aeternity node folder as first parameter";
exit 1
@tolbrino
tolbrino / epoch.sh
Last active November 26, 2018 10:33
Files for epoch Windows development setup
# Basic config
export EDITOR=vim
# Msys2 config
export MSYS=winsymlinks:nativestrict
make_winpath()
{
P=$1
if [ "$IN_CYGWIN" = "true" ]; then

Keybase proof

I hereby claim:

  • I am tolbrino on github.
  • I am kolibri (https://keybase.io/kolibri) on keybase.
  • I have a public key whose fingerprint is BBEE 15B6 3060 ABA8 2B9D 0B3C BA14 7AD3 6B43 8CB3

To claim this, I am signing this object:

@tolbrino
tolbrino / testimap.py
Created October 23, 2015 07:30
Script to check access of multiple email accounts against an IMAP host.
#!/usr/bin/env python
import sys
import imaplib
EMAIL_ACCOUNT_SUFFIX = "@mydomain.com"
EMAIL_HOST = "mail.myhost.com"
EMAIL_ACCOUNTS = {
"name": "pass",
@tolbrino
tolbrino / nginx.conf
Created September 22, 2015 15:15 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048

Archlinux setup guide

This guide is based on the official Archlinux [Installation Guide][1], [Beginners' Guide][2] and my personal experience.

Partition layout

HDD fs size mountpoint
/dev/sda1 LUKS MAX -
/dev/sda1 LVM MAX /dev/mapper/lvm