Skip to content

Instantly share code, notes, and snippets.

View bliotti's full-sized avatar
public key cryptography is pretty neat 🔑 🔐

Brian Liotti bliotti

public key cryptography is pretty neat 🔑 🔐
View GitHub Profile
@raine
raine / ramda
Last active May 4, 2020 12:14
Browse Ramda documentation in Terminal
#!/usr/bin/env bash
# Browse Ramda documentation in Terminal
# Requires jq and a tool such as fzf or peco for interactive filtering
LATEST="http://raine.github.io/ramda-json-docs/latest.json"
DOCS_URL="http://ramdajs.com/docs/"
json=$(curl -s $LATEST)
functions=$(echo "$json" | jq -r '.[] | if .sig and (.sig | length > 0) then .name + " :: " + .sig else .name end')
@tkfm-yamaguchi
tkfm-yamaguchi / lang.map.diff
Last active February 5, 2024 19:51
source-highlight's language definition file for YAML
---/usr/share/source-highlight/lang.map.old
+++/usr/share/source-highlight/lang.map
@@ -169,3 +169,5 @@
groovy = groovy.lang
json = json.lang
feature = feature.lang
+yaml = yaml.lang
+yml = yaml.lang

Network partition resistance

For the Bitcoin network to remain in consensus, the network of nodes must not be partitioned. So for an individual node to remain in consensus with the network, it must have at least one connection to that network of peers that share its consensus rules. This document describes how we attempt to achieve this.

We can't rely on inbound peers to be honest, because they are initiated by others. It's impossible for us to know, for example, whether all our inbound peers are controlled by the same adversary.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[Application Options]
lnddir=/home/bitcoin/lnd_data
maxpendingchannels=10
alias=YOURALIAS
rpclisten=0.0.0.0:10009
[Bitcoin]
bitcoin.active=1
bitcoin.mainnet=1
bitcoin.node=bitcoind
@bliotti
bliotti / cloudSettings
Last active November 17, 2019 11:59
Visual Studio Code Settings Sync Gist OSX
{"lastUpload":"2019-11-17T11:59:30.763Z","extensionVersion":"v3.4.3"}
@BretCameron
BretCameron / LinkedList.js
Created September 30, 2019 09:16
The full LinkedList implementation from this tutorial: https://bit.ly/2mihZac
class LinkedListNode {
constructor(value, next) {
this.value = value;
this.next = next || null;
}
}
class LinkedList {
constructor(value) {
this.size = 0;
@bliotti
bliotti / cloudSettings
Last active March 4, 2020 17:50
Visual Studio Code Settings Sync Gist WINDOWS
{"lastUpload":"2020-03-04T17:50:36.301Z","extensionVersion":"v3.4.3"}
@bliotti
bliotti / cluster-issuer.yaml
Last active May 15, 2021 03:00 — forked from lvnilesh/cluster-issuer.yaml
DNS acme cluster-issuer.yaml - third time is a charm
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-staging
namespace: cert-manager
spec:
acme:
email: brian@liotti.io
server: https://acme-staging-v02.api.letsencrypt.org/directory
privateKeySecretRef:
@bliotti
bliotti / monitor-pi.sh
Created June 7, 2021 21:11
Monitors Ras Pi temp.
#!/bin/bash
Counter=14
DisplayHeader="Time Temp CPU Core Health Vcore PMIC"
while true ; do
let ++Counter
if [ ${Counter} -eq 15 ]; then
echo -e "${DisplayHeader}"
Counter=0
fi
Health=$(perl -e "printf \"%19b\n\", $(vcgencmd get_throttled | cut -f2 -d=)")