Skip to content

Instantly share code, notes, and snippets.

@xtang
xtang / Claude_Code_Perses
Last active September 8, 2025 07:44
Perses config for monitoring Claude Code
{
"kind": "Dashboard",
"metadata": {
"name": "claude-code-personal",
"project": "default",
"version": 1
},
"spec": {
"display": {
"name": "Claude Code Personal Usage Dashboard"
@transitive-bullshit
transitive-bullshit / claude-code-prompts.js
Last active September 14, 2025 15:11
Unminified prompts and tool definitions for Claude Code
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service.
// By using Claude Code, you agree that all code acceptance or rejection decisions you make,
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms,
// and may be used to improve Anthropic's products, including training models.
// You are responsible for reviewing any code suggestions before use.
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
// Version: 0.2.9
@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 September 6, 2025 00:06
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 August 11, 2025 12:54
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

// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* Workaround example on how to inject and execute arbitrary bytecode in solidity contract
* Currently only YUL supports verbatim: https://github.com/ethereum/solidity/issues/12067
* But you cannot import Solidity code in YUL, or YUL code in solidity, so this workaround is necessary.
* It works as long the byte sequence `0x7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F00` appear in the runtime code.
*
@ChristopherA
ChristopherA / ssh-keys-best-practices.md
Last active September 4, 2025 01:12
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',