Skip to content

Instantly share code, notes, and snippets.

This was written in response to bitcoin/bitcoin#27578 and any other number of occurrences of the topic.

“Standardness policy” is a term for a transaction that would be consensus-legal, but our node doesn’t want to relay for various reasons. Clearly if it’s consensus valid we want to accept it to not split the network if a miner chooses a “weird” transaction to mine.

There are N motivations for policy that I know of:

  1. Anti-DoS: Only “cheap” things to validate get flooded to the network
  2. Security: Certain types of transactions may mess up certain systems for no good reason
  3. Upgrade hooks: We leave some things “forbidden” such that if we find a use for them later we don’t “confiscate” funds by refusing to relay e.g., a spend or pre-signed transaction
  4. Pro-decentralization: Make it simple/cheap for miners to build blocks that pay well
@chrisswanda
chrisswanda / WireGuard_Setup.txt
Last active May 8, 2024 20:24
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@ursulacj
ursulacj / Create-branch-with-Github-API.md
Last active May 8, 2024 20:24 — forked from auwsome/Create-branch-with-Github-API.md
Create a branch on Github using API and Python

Create a branch on Github using API and Python

Created as a module that can be imported or run. Requires built in JSON, requests, and datetime modules.

Allows you to clone a branch on Github using the Github Git Database API Endpoints.

Forked Gist from:

  • auwsome/Create-branch-with-Github-API.md

See:

@BigOokie
BigOokie / MacOS-Multi-Version-Go-With-Homebrew.md
Last active May 8, 2024 20:22
Manage multiple versins of Go on MacOS with Homebrew

This process would likely apply to other Homebrew formula also.

First search for your desired package:

brew search go

You should get a list of results that include the below. Not "go" is very unspecific so you may get a lot of results:

@jsignell
jsignell / pre-commit-ci.yml
Last active May 8, 2024 20:22
Github Action to run pre-commit on files changed between target branch and base branch
name: pre-commit-ci
on:
pull_request:
branches:
- main
jobs:
pre-commit-ci:
name: Lint changed backend files
runs-on: ubuntu-latest
steps:
@kimsama
kimsama / Unity-GetAllFilesUnderSelectedFoder.cs
Last active May 8, 2024 20:22
Code snip which shows gather all files under selected folder in Unity's Project View
/// <summary>
/// Retrieves selected folder on Project view.
/// </summary>
/// <returns></returns>
public static string GetSelectedPathOrFallback()
{
string path = "Assets";
foreach (UnityEngine.Object obj in Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.Assets))
{
@ityonemo
ityonemo / test.md
Last active May 8, 2024 20:17
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@NotHarshhaa
NotHarshhaa / k8s-install.md
Last active May 8, 2024 20:16
k8s step-by-step installation guide on Ubuntu 20.04 from scratch

Certainly! Here's a step-by-step guide to installing Kubernetes (K8s) on Ubuntu 20.04 from scratch. This guide will walk you through the process of setting up a basic Kubernetes cluster using kubeadm, kubelet, and kubectl.

Prerequisites:

  1. Ubuntu 20.04: You should have a clean installation of Ubuntu 20.04 on the machines where you plan to set up your Kubernetes cluster.

  2. Minimum 2 Nodes: For a basic Kubernetes cluster, you need at least two nodes - one for the master and one or more for worker nodes.

  3. Network Configuration: Ensure that your nodes can communicate with each other over the network. You should have a static IP address for each node.

@scyto
scyto / proxmox.md
Last active May 8, 2024 20:16
proxmox cluster proof of concept

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project

@karpathy
karpathy / min-char-rnn.py
Last active May 8, 2024 20:15
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)