Skip to content

Instantly share code, notes, and snippets.

@storopoli
storopoli / 9barista_coffee.md
Created December 28, 2021 22:07
9Barista Coffee

9Barista Coffee

  1. 120mL Water
  2. 18g Coffee
  3. Tamping — firm push downwards — around 5kg of force is enough
  4. Medium to High Heat — closest to 3in in diameter
  5. Expresso should be 35-40mL
  6. Pour your espresso straight away

Grinder

@storopoli
storopoli / Cargo.toml
Last active August 2, 2024 21:02
Rust Linters
[lints.rust]
unsafe_code = "forbid" # Forbid unsafe code
[lints.clippy]
enum_glob_use = "deny" # Deny `use Enum::*`
unwrap_used = "deny" # Deny `.unwrap()`
pedantic = { level = "deny", priority = -1 } # Deny a bunch of stuff
nursery = { level = "deny", priority = -1 } # Deny another bunch of stuff
[profile.release]
@storopoli
storopoli / alpine.json
Last active November 16, 2024 11:34
Devcontainers Configs
{
"name": "Alpine",
"image": "mcr.microsoft.com/devcontainers/base:alpine",
"postCreateCommand": "sudo apk update && sudo apk add <PKGS>"
}
@storopoli
storopoli / default.nix
Last active July 18, 2025 16:14
Custom Rust in Nix Shell
let
rust-overlay = import (builtins.fetchTarball {
url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz";
# Optionally pin to specific commit:
# url = "https://github.com/oxalica/rust-overlay/archive/COMMIT_HASH.tar.gz";
});
in
with import <nixpkgs> { overlays = [ rust-overlay ]; };
mkShell {
buildInputs = [
@storopoli
storopoli / init.lua
Last active July 27, 2025 14:29
Minimal Neovim config
-------------------------------------------------------------------------------
-- DEPENDENCIES
-- neovim ripgrep fd fzf
-- LSPs: rust-analyzer clangd taplo yaml-language-server
-- vscode-html-languageserver vscode-css-languageserver vscode-json-languageserver
-- pyright ruff lua-language-server typescript-language-server
-- bash-language-server tinymist
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
@storopoli
storopoli / object_safety.rs
Created July 8, 2024 12:38
Rust: Object Safe Traits
// In general there are two properties for traits to satisfy
// in order them to be object-safe:
//
// 1. The return type isn’t Self.
// 2. There are no generic type parameters.
// Here's an example of a non-object-safe Trait
trait MyTrait {
fn f(&self) -> Self;
@storopoli
storopoli / stack_pinning.rs
Created July 30, 2024 20:36
Getting mutable references to a pinned struct in the stack
use std::pin::pin;
use std::marker::PhantomPinned;
#[derive(Debug)]
struct MyStruct {
field: u32,
_pin: PhantomPinned
}
impl MyStruct {
@storopoli
storopoli / halting_problem.md
Created August 5, 2024 20:06
The Halting problem
fn halts(program: A) -> bool

fn b(program: A) {
    if halts(A) {
        loop {}
    } else {
        return ();
    }
}
@storopoli
storopoli / nixify-your-codebase.md
Last active June 23, 2025 20:11
Nixify your Codebase Workshop

title: How to Nixify your codebase sub_title: Docker is a shitcoin author: Jose Storopoli, Alpen Labs, storopoli.io, stratabtc.org options: incremental_lists: true theme: override: code: alignment: left

@storopoli
storopoli / signatures.typ
Last active October 23, 2024 23:04
Schnorr vs ECDSA Signatures
#import "@preview/polylux:0.3.1": *
#import themes.simple: *
#set text(font: "Inria Sans")
#set align(horizon)
#show: simple-theme.with(footer: [Bitcoin Signatures])
#title-slide[
= Bitcoin Signatures
#v(2em)