Skip to content

Instantly share code, notes, and snippets.

@sambacha
sambacha / AsciidocCheatsheet.adoc
Created May 30, 2020 14:57 — forked from powerman/AsciidocCheatsheet.adoc
Asciidoc cheatsheet for GitHub

Asciidoc cheatsheet for GitHub

#!/bin/sh
#
# Suggested name for this script: git-clean-stale-branches
#
# This script will help to remove "stale" branches from a remote
# repository (by default the "origin" repository). Stale branches
# are any branches that does not exist in the local repository.
#
# This script should be run in the local repository. It will print
# out a git command to remove all branches from the remote repository
@sambacha
sambacha / nodejs-sample.js
Created June 16, 2020 17:02 — forked from jasonk000/nodejs-sample.js
Using x.509 certs with JWS/JWT/JWK
#!/usr/bin/env node
import fs from 'fs'
import jose from 'node-jose'
import pem from 'pem'
async function run () {
try {
// keystore to stick our node-jose keys before we do signing
let keystore = jose.JWK.createKeyStore()
@sambacha
sambacha / besu_haproxy.config
Last active June 20, 2020 11:46 — forked from bwiggs/haproxy.config
HAProxy Config File Example for Hyperledger Besu
frontend discovery-tcp-30303
bind *:30303
acl ...
...
default_backend back-discovery-tcp-30303
frontend rpc-tcp-8545
bind *:8545
acl ...
...

The interrelated stories of at least but not limited to EIP1283, EIP1706, EIP2200, EIP1884, ECIP1061, ECIP1078, and ECIP1086.

EIP1283 comes into existence. Has way of net gas metering. Gets Finalized.

EIP____ ("Constantinople") comes into existence specifying enabling EIP1283 on ETH (and testnets).

EIP1283 enabled on Ropsten and other testnets.

Uh oh! EIP1283 has bugs.

@sambacha
sambacha / README.md
Last active July 9, 2023 22:50 — forked from ndarville/README.md
From CSV to HTML table (Simple)

This code generates an HTML table based from a CSV file. This is from the tutorial by Christophe Viau.

In trying his code example, I discovered that the code doesn't work as-is, so I figured others might like to see a working d3.js example that did not rely on a pre-existing container HTML element.

The code remains the same except for some cosmetic tweaks.

The task of writing the CSS is left as an exercise for the reader.

@sambacha
sambacha / spacephonebook.py
Created July 21, 2020 04:31 — forked from xopr/spacephonebook.py
Spacephone.org NAPTR to CSV/JSON/VCF phonebook generator
#!/usr/bin/env python3
#pip-3 install dnspython
import dns.resolver
import dns.e164
import re
import sys
import optparse
@sambacha
sambacha / netlify.toml
Created August 23, 2020 03:16 — forked from DavidWells/netlify.toml
All Netlify.toml & yml values
[Settings]
ID = "Your_Site_ID"
# Settings in the [build] context are global and are applied to all contexts unless otherwise overridden by more specific contexts.
[build]
# This is the directory to change to before starting a build.
base = "project/"
# NOTE: This is where we will look for package.json/.nvmrc/etc, not root.
# This is the directory that you are publishing from (relative to root of your repo)
@sambacha
sambacha / .gitconfig
Last active August 28, 2020 03:00 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = uname
email = uname@hostname
username = whoami
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@sambacha
sambacha / interest-rates-ingestion-API.txt
Created September 4, 2020 11:14 — forked from frostiq/interest-rates-ingestion-API.txt
LoanScan interest rates ingestion API spec
Interest rates ingestion endpoint is a HTTP GET endpoint available via https protocol
e.g. "https://example.com/rates?api-key=XXXXXXXXXXX"
If this endpoint requires an API key, it should be accepted as a query string parameter, HTTP headers are not supported
The response should be a JSON object that corresponds to the following example:
{
    "lendRates": [
        {
            "apy": 0.0100005, // Annual Percentage Rate, multiplier format
            "apr": 0.01, // Annual Percentage Yield, multiplier format