Skip to content

Instantly share code, notes, and snippets.

𝙧𝙚𝙘𝙪𝙧𝙨𝙞𝙫𝙚 𝙩𝙖𝙪𝙩𝙤𝙡𝙤𝙜𝙮

Joseph Chiocchi yyolk

𝙧𝙚𝙘𝙪𝙧𝙨𝙞𝙫𝙚 𝙩𝙖𝙪𝙩𝙤𝙡𝙤𝙜𝙮
View GitHub Profile
yyolk /
Created Aug 27, 2021 — forked from zbeekman/
Setting up GH-pages with custom domain, strict (end-to-end) SSL with CloudFlare DNS & CDN

Custom domains, GH-pages, Cloudflare and strict SSL end-to-end encryption

Why I wrote this

Before Github supported SSL encryption for github pages sites, many people were using CloudFlare (CF) as their DNS provider and CDN proxy. CF allowed users to enable SSL encryption from the CDN end points/proxies to the end user. This was great and it allowed visitors to your website to connect with a secure connection between their browser and the cloudflare CDN box that was serving your content. However, with this setup one (significant) link in the chain remained unencrypted and

yyolk /
Created Aug 3, 2021
simple price aggregate with ccxt
import ccxt
def get_price(exchange_client, pair) -> float:
return exchange_client.fetch_ticker(pair).get("last")
if __name__ == "__main__":
binance = (ccxt.binance(), "XRP/USDT")
bitfinex = (ccxt.bitfinex(), "XRP/USD")
yyolk /
Last active Jul 7, 2021
watch subscribed events to your xrpl node from the command line
# install websocat
# cargo install --features=ssl websocat
# --features=ssl needs to be included to connect to wss://
# we use `<<<` to send a string into the command:
# echo '{"command"...}' | websocatt ...
# is equivalent
yyolk /
Last active Jul 9, 2021
using python3, websockets and asyncio connect to rippled, subscribe and work on received messages
#!/usr/bin/env python3
Prints out the Ledger No. and the total txns, along with a visual indication.
Illustrates a raw web socket connection and consuming the messages with asyncio
If you're running an XRPL node, run this script on the node with the admin
yyolk / irssi twitch.txt
Last active Jun 30, 2021 — forked from lambdan/irssi twitch.txt
Twitch chat with irssi - June 2021
View irssi twitch.txt
Tested working 20 Jun 2021, irssi version 1.2.3
This is a TLDR version of
Get your OAuth token (password) here:
# Network setup:
/network add -nick YOUR_TWITCH_USERNAME twitch
/server add -auto -ssl -network Twitch 6697 YOUR_OAUTH_TOKEN
yyolk / snp
Created Apr 28, 2021 — forked from erikw/snp
snp: Wrap shell command in BTRFS snapper pre-post snapshots and log outputs.
View snp
#!/usr/bin/env bash
# Runs a command wrapped in btrfs snapper pre-post snapshots.
# Usage: $ snp <commands>
# e.g.: $ snp pacman -Syyu
# The latest version of this script is hosted at
date=$(date "+%Y-%m-%d-%H%M%S")
yyolk /
Last active Aug 18, 2020 — forked from utek/
Define ignored tables in alembic.ini

Add this in your ini file:

tables = spatial_ref_sys


yyolk /
Created Feb 9, 2020
a bash cli for googling things from the cli using, can be easily ported elsewhere source and then `goog something i'm looking for`
# modified from
rawurlencode() {
local string="${1}"
local strlen=${#string}
local encoded=""
local pos c o
for (( pos=0 ; pos<strlen ; pos++ )); do
case "$c" in
yyolk /
Created Feb 9, 2020 — forked from luvarqpp/
setup L2TP IPSEC VPN in archlinux using NetworkManager

setup L2TP IPsec VPN in archlinux using NetworkManager

install networkmanager-l2tp first:

yaourt -S networkmanager-l2tp
apt install -y network-manager-l2tp
yyolk /
Created Feb 12, 2019
generates a random psw of 8-16 of length
import string
MIN_LEN, MAX_LEN = 8, 16
from random import randint, choice
characters = string.ascii_letters + string.punctuation + string.digits
password = lambda : "".join(choice(characters) for x in range(randint(MIN_LEN, MAX_LEN)))