- miniogre: from source code to reproducible envionments, in seconds
pip install miniogre
- Go to project folder
- Run
miniogre run
- freeze: generate images of code and terminal output
brew install charmbracelet/tap/freeze
freeze --execute "ls -ltra"
- uv: An extremely fast Python package installer and resolver, written in Rust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### Preamble ########################################### | |
SHELL := bash | |
.ONESHELL: | |
.SHELLFLAGS := -eu -o pipefail -c | |
.DELETE_ON_ERROR: | |
.SECONDEXPANSION: | |
MAKEFLAGS += --warn-undefined-variables | |
MAKEFLAGS += --no-builtin-rules | |
MAKEFLAGS += -j$(shell nproc) |
A step-by-step guide to setting up Model Context Protocol (MCP) servers for Claude Desktop on Windows.
- Install Node.js (v18.x or later)
- Download from: https://nodejs.org/
- Verify installation by opening PowerShell and running:
node --version
npm --version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do | |
osascript -e ' | |
tell application "System Events" | |
if exists process "Claude" then | |
tell process "Claude" | |
if exists button "Allow for This Chat" of group 2 of group 1 of group 1 of group 1 of UI element 2 of group 1 of group 1 of group 1 of group 1 of window "Claude" then | |
click button "Allow for This Chat" of group 2 of group 1 of group 1 of group 1 of UI element 2 of group 1 of group 1 of group 1 of group 1 of window "Claude" | |
log "clicked allow button" | |
end if | |
end tell |
This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).
Matrix multiplication is a mathematical operation that defines the product of
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.27) | |
project(_ext LANGUAGES CXX) | |
# ----------------------------- Setup ----------------------------- | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | |
option(BUILD_SHARED_LIBS "Build as a shared library" ON) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------------------- | |
# AI-powered Git Commit Function | |
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It: | |
# 1) gets the current staged changed diff | |
# 2) sends them to an LLM to write the git commit message | |
# 3) allows you to easily accept, edit, regenerate, cancel | |
# But - just read and edit the code however you like | |
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/ | |
gcm() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires: | |
# pip install pyobjc-framework-Metal | |
import numpy as np | |
import Metal | |
# Get the default GPU device | |
device = Metal.MTLCreateSystemDefaultDevice() | |
# Make a command queue to encode command buffers to | |
command_queue = device.newCommandQueue() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# set -x # Enable debug mode | |
set -e # Exit immediately if a command exits with a non-zero status. | |
echo "Script started" >&2 | |
# Function to get absolute path (works on macOS and Linux) | |
get_abs_path() { | |
local path="$1" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder