Skip to content

Instantly share code, notes, and snippets.

@saltiniroberto
saltiniroberto / confirmation_rule.py
Last active May 11, 2025 13:18
confirmation_rule.py
def is_one_confirmed(store, block_root) -> bool:
"""
Same logic as in the Confirmation Rule PR
"""
pass
def get_checkpoint_weight(store, checkpoint, checkpoint_state) -> Gwei:
"""
Uses LMD-GHOST votes to estimate FFG support for a checkpoint.
@b0gdanw
b0gdanw / Disable-Sequoia-Bloatware.sh
Last active June 12, 2025 21:19
Disable Sequoia Bloatware
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13), macOS Sonoma (14) and macOS Sequoia (15)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user

Your is the single biggest render-blocking part of your page—ensuring it is well-formed is critical. ct.css is a diagnostic CSS snippet that exposes potential performance issues in your page’s tags.

Drag and drop the following link to your bookmarks bar (or click for simple demo): ct.css.

@VictorTaelin
VictorTaelin / towards_an_optimal_computer.md
Last active May 31, 2025 00:45
Higher-Order Company: Towards an Optimal Computer

Higher-Order Company: Towards an Optimal Computer

What is the true nature of computation?

A hundred years ago, humanity answered that very question, twice. In 1936, Alan invented the Turing Machine, which, highly inspired by the mechanical trend of the 20th century, distillated the common components of early computers into a single universal machine that, despite its simplicity, was capable of performing every computation conceivable. From simple numerical calculations to entire

@ChristopherA
ChristopherA / ssh-keys-best-practices.md
Last active May 30, 2025 06:31
SSH Keys - Best Practices

SSH Keys Best Practices

(VERY rought draft, still a work-in-progress)

SSH Key Seperation

Authentication and signing keys serve different purposes, especially on platforms like GitHub where code integrity and access control are crucial. Here's a comparison based on their functions and best practices:

Authentication Keys:

  1. Purpose:
@TriceHelix
TriceHelix / linux_evdev_capabilities.md
Last active June 10, 2025 07:23
Decoding Input Device (evdev) Capabilities on Linux (alternative to EVIOCGBIT ioctl)

Decoding Input Device (evdev) Capabilities on Linux

Introduction

Input devices (whether physically present, or emulated) may produce any "kind" of input. In other words there is no clear distinction between a keyboard and a mouse, other than the data they (i.e., their drivers) write to their corresponding /dev/input/eventX file (where X is an integer). That can be problematic sometimes, for example if a program in userspace consumes input data from a device and expects that data to only contain certain keycodes, event types, etc. Another example could be a video game which displays different sprites/text when a gamepad is used instead of a keyboard, like key/button prompts in a tutorial or a settings menu. Luckily, most devices only write a strict set of event types and codes to their eventX file, because well, most hardware is only a keyboard, or mouse, or gamepad, or touchscreen, etc. and not a wild combination. The kernel calls these the input device's capabilities, as documented [here](ht

@martin-mael
martin-mael / flexoki-tailwind-colors.ts
Created October 8, 2023 02:07
Flexoki Tailwind colors
// Tailwind colors for Flexoki theme by Steph Ango. https://stephango.com/flexoki
const colors = {
base: {
black: '#100F0F',
950: '#1C1B1A',
900: '#282726',
850: '#343331',
800: '#403E3C',
700: '#575653',

Trying Ezno checking today

This a short overview of some of the things you can do with Ezno today. If you find any problems, file an issue.

The following examples show some errors that have been caught using type checking, partial/const evaluation and effects.

To get started we will install oxidation-compiler which has bindings for Ezno's checker. (you can also get the binary from the releases page).

npm install -g oxidation-compiler@latest
@taarushv
taarushv / mev.js
Last active January 26, 2024 09:16
Analyzing backrun/rebate in txs 0/1/2 in https://etherscan.io/block/17358588
// TX 1 - Admin wallet enables trading on FCKIT token https://etherscan.io/tx/0x12b949cf5605bb4da83efd14b6d38ad628a9ebf3befb42141d2ddb8cfc43d53e
// TX 2 - Searcher uses a proxy contract to buy ~2B FCKIT --for 60 ETH-- into multiple wallets (and to pay builder for gas fees/rebate) https://etherscan.io/tx/0xc3a37580a96b52a718a5b516dfef209f150e87a75032c725536821ea0d6cc875
// TX 3 - Rebate is forwarded from the flashbots builder back to the user https://etherscan.io/tx/0x80dc2721d833cd221bdf9264f1138a88907f57303bc606f8ee4034297201e095
const { ethers } = require('ethers'); // v5
const rpc = "https://mainnet.infura.io/v3/YOUR_API_KEY_HERE"
const provider = new ethers.providers.JsonRpcProvider(rpc)
// uni v2 router, to fetch trades using logs
const uniPool ="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
@recmo
recmo / keccak-aarch64.rs
Last active October 17, 2023 23:17
Rust aarch64 FEAT_SHA3 implementation of keccak_f1600.
#![cfg(all(target_arch = "aarch64", target_feature = "sha3"))]
use core::arch::asm;
const RC: [u64; 24] = [
0x0000000000000001,
0x0000000000008082,
0x800000000000808a,
0x8000000080008000,
0x000000000000808b,
0x0000000080000001,