Skip to content

Instantly share code, notes, and snippets.

ack(){
echo ACK `git rev-parse head`
echo \<details\>\<summary\>Show Signature\<\/summary\>
echo -e '\n```'
echo ACK `git rev-parse head` | gpg -s -q -a --clearsign
echo -e '```\n'
echo "pinheadmz's public key is [on keybase](https://keybase.io/pinheadmz/pgp_keys.asc?fingerprint=e61773cd6e01040e2f1bd78ce7e2984b6289c93a)"
echo \<\/details\>
}
@tynes
tynes / swap-script.txt
Last active April 16, 2020 06:33
more simple swap script
New Script
Opcode.fromSymbol('type'),
Opcode.fromInt(rules.types.TRANSFER),
Opcode.fromSymbol('equal'),
Opcode.fromSymbol('if'),
Opcode.fromSymbol('dup'),
Opcode.fromSymbol('blake160'),
Opcode.fromPush(pubkeyhash),
@braydonf
braydonf / bip-xxxx.mediawiki
Last active August 27, 2019 18:41
Multi-Account Hierarchy for P2WSH Multi-signature Deterministic Wallets


  BIP&#58; x
  Layer&#58; Applications
  Title&#58; Multi&#45;Account Hierarchy for P2WSH Multi&#45;signature Deterministic Wallets
  Author&#58; Braydon Fuller <braydon@purse.io>
  Comments&#45;Summary&#58; No comments yet.
  Comments&#45;URI&#58; https&#58;//github.com/bitcoin/bips/wiki/Comments&#58;BIP&#45;x
  Status&#58; Draft
  Type&#58; Standards Track
  Created&#58; 2019&#45;02&#45;12

@chrisswanda
chrisswanda / WireGuard_Setup.txt
Last active May 2, 2024 01:13
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
@markblundeberg
markblundeberg / P2I.md
Last active June 1, 2019 15:20
"Pay To Identity" — a proposed use of OP_CHECKDATASIG

"Pay To Identity" — a proposed use of OP_CHECKDATASIG

Dr. Mark B. Lundeberg, 2018 September 6 bitcoincash:qqy9myvyt7qffgye5a2mn2vn8ry95qm6asy40ptgx2

A mechanism where a Bitcoin Cash payment is made to a personally identifying string (real name, email address, social media handle, etc.) instead of directly to a cryptographic key. The payment can only be claimed by the recipient if they generate a public key and get it certified by an identity verifier. This certification signature is confirmed in script via the new opcode OP_CHECKDATASIG.

Characteristics:

  • Pay anyone, right now -- recipient doesn't need to have any cryptographic keys nor do they even need a phone/computer. (They only need these to claim the funds later.)
@amiller
amiller / TinyDuplex.sol
Last active May 13, 2019 20:38
TinyDuplex.sol: minimalist duplex micropayment channel for Ethereum
pragma solidity ^0.4.22;
// ECE 398 SC - Smart Contracts and Blockchain Security
// http://soc1024.ece.illinois.edu/teaching/ece398sc/spring2018/
// Simpest possible duplex-micropayment channel
// - Funded with an up front amount at initialization
// - The contract creator is called "alice". The other party, "bob", is passed
// as an argument to the Constructor
// - There is no fixed deadline, but instead any party can initiate a dispute,
// which lasts for a fixed time
@gillescastel
gillescastel / Ultisnip snippets
Last active February 1, 2024 13:39
Vimtex setup
snippet template "Basic template" b
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[dutch]{babel}
\usepackage{amsmath, amssymb}
\begin{document}
@dehamzah
dehamzah / scp-cheatsheet.md
Last active December 11, 2023 10:26
SCP Cheatsheet

Basic Syntax

$ scp source_file_path destination_file_path

Uploading

Single file

@sooryan
sooryan / blake2.md
Last active March 12, 2024 02:37
A quick summary of blake2, a cryptographic hash function

BLAKE2

  • BLAKE2 is an improved version of the SHA-3 finalist BLAKE, and was designed by a team of experts in cryptanalysis, implementation, and cryptographic engineering; namely Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O'Hearn and Christian Winnerlein.

  • BLAKE2s (the one checksum currently uses) computes a message digest that is 256 bits long, and represented as a 64-character hexadecimal number, e.g. 4264cb256d94533b6e152da59256638bc6adfda3efc5550d7607d4e6e45592fc.

Types

  • BLAKE2b (or just BLAKE2) is optimized for 64-bit platforms and produces digests of any size between 1 and 64 bytes.
@natefoo
natefoo / 00README.md
Last active April 30, 2024 13:50
Linux Distribution Detection

Distribution Detection

I am working on adding support for building and distributing (via PyPI) Python Wheels with C Extensions to the Python wheel and pip packages. The discussion on Distutils-SIG continues, but I believe it is fairly certain that some effort to correctly identify Linux distributions will need to be made. I've begun efforts to add this support to wheel.

How you can help

If you have a Linux distribution or version of a listed distribution not in this gist, or one of the ones I have not directly verified, I could use the following:

  • The contents of /etc/os-release, if it exists