Skip to content

Instantly share code, notes, and snippets.

View yyolk's full-sized avatar
🍯
𝙧𝙚𝙘𝙪𝙧𝙨𝙞𝙫𝙚 𝙩𝙖𝙪𝙩𝙤𝙡𝙤𝙜𝙮

Joseph Chiocchi yyolk

🍯
𝙧𝙚𝙘𝙪𝙧𝙨𝙞𝙫𝙚 𝙩𝙖𝙪𝙩𝙤𝙡𝙤𝙜𝙮
View GitHub Profile
@yyolk
yyolk / chia-blockchain.patch
Created August 10, 2023 00:27
FreeBSD patches for running Chia-Network/chia-blockchain@2.0.0-rc4
diff --git a/setup.py b/setup.py
index fc27c7d1e..9e86d7469 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ dependencies = [
"boto3==1.26.161", # AWS S3 for DL s3 plugin
"chiavdf==1.0.10", # timelord and vdf verification
"chiabip158==1.2", # bip158-style wallet filters
- "chiapos==2.0.0", # proof of space
+ "chiapos", # proof of space
@yyolk
yyolk / nm_l2tp_ipsec_vpn.md
Created February 9, 2020 22:13 — forked from luvarqpp/nm_l2tp_ipsec_vpn.md
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
yyolk / irssi twitch.txt
Last active January 26, 2023 04:57 — forked from lambdan/irssi twitch.txt
Twitch chat with irssi - June 2021
Tested working 20 Jun 2021, irssi version 1.2.3
This is a TLDR version of https://blog.crunchprank.net/connecting-to-twitch-chat-via-irssi/
Get your OAuth token (password) here: https://twitchapps.com/tmi/
# Network setup:
/network add -nick YOUR_TWITCH_USERNAME twitch
/server add -auto -ssl -network Twitch irc.chat.twitch.tv 6697 YOUR_OAUTH_TOKEN
@yyolk
yyolk / _rtorrent-pushover.md
Last active October 31, 2022 00:23
rtorrent + pushover howto & sample

#script to use pushover for rtorrent notifications

Used for openelec [unofficial][unofficial] rtorrent addon but can be part of any rtorrent setup.

  1. Buy Pushover for [iOS][ios] or [Android][android]
  2. Create a new app, and upload a custom icon for your notifications.
  3. [Download][rbraw] or copy rtorrent-notification.rb into a new file
  4. Insert your new app's API token in script under token
#!/bin/sh
awk 'function wl() {
rate=64000;
return (rate/160)*(0.87055^(int(rand()*10)))};
BEGIN {
srand();
wla=wl();
while(1) {
wlb=wla;
wla=wl();
@yyolk
yyolk / sample_sns_event.json
Created October 30, 2015 20:52
AWS Lambda SNS Sample Event
{
"Records": [
{
"EventVersion": "1.0",
"EventSubscriptionArn": "arn:aws:sns:EXAMPLE",
"EventSource": "aws:sns",
"Sns": {
"SignatureVersion": "1",
"Timestamp": "1970-01-01T00:00:00.000Z",
"Signature": "EXAMPLE",
@yyolk
yyolk / GH-CF-strict-SSL-w-CDN.md
Created August 27, 2021 19:48 — forked from zbeekman/GH-CF-strict-SSL-w-CDN.md
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
yyolk / simple_xrp_price_agg.py
Created August 3, 2021 18:38
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
yyolk / 01__websockets__xrpl_stat_table.py
Last active July 9, 2021 03:56
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
Setup:
If you're running an XRPL node, run this script on the node with the admin
@yyolk
yyolk / websocat_subscribe_jq_process.sh
Last active July 7, 2021 19:29
watch subscribed events to your xrpl node from the command line
#!/bin/bash
# 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