Skip to content

Instantly share code, notes, and snippets.

@joboet
joboet / 0000-pattern-types.md
Last active November 30, 2025 12:44
Pattern types RFC

Summary

This RFC introduces pattern types, which are subtypes of matchable types that are statically restricted to a subset of the variants of the original type.

@marirs
marirs / rust-cross-compile-openssl
Last active October 31, 2024 15:39
Rust OpenSSL Cross Compile for Linux on Mac M1
# Install the toolchain
```bash
brew tap SergioBenitez/osxct
brew install x86_64-unknown-linux-gnu
```
# this should get installed in:
# /opt/homebrew/Cellar/x86_64-unknown-linux-gnu/
# Installing the macOS OpenSSL - if not already installed
@ysqi
ysqi / decode_bitcoin_block_data.go
Created December 11, 2017 00:51
Decode bitcoin block chain dat file, and get block data deail content
package main
import (
"bytes"
"crypto/sha256"
"encoding/binary"
"encoding/hex"
"fmt"
"io"
"log"
package main
import (
"log"
"github.com/piotrnar/gocoin/blockdb"
"github.com/piotrnar/gocoin/btc"
"encoding/hex"
)
func main() {
// Set real Bitcoin network