Step-by-step guide for building the Claude Code CLI from the alesha-pro/claude-code repository — leaked Anthropic Claude Code source code.
- Linux (Ubuntu 22.04+) or macOS
- 4GB RAM, 4 CPU cores, 30GB disk
- Bun >= 1.3
- Git
Step-by-step guide for building the Claude Code CLI from the alesha-pro/claude-code repository — leaked Anthropic Claude Code source code.
| #!/usr/bin/env bash | |
| # Download VMware Fusion for macOS without a Broadcom account. | |
| # | |
| # This script allows you to download various versions of VMware Fusion for | |
| # different architectures by parsing available metadata and downloading from Cloudflare CDN. | |
| # | |
| # Only builds v8.0.0 - v13.6.3 are supported (for now) | |
| # | |
| # Use '-k' to keep the download file compressed, exiting after download. |
| #netcat proxy to a different backed and serve requests on port80 | |
| mkfifo fifo_pipe | |
| nc -lk -p 80 < fifo_pipe | nc 192.168.1.10 3306 >fifo_pipe | |
| #socat doing the same with connection verbosity | |
| socat -d -d TCP-LISTEN:80,fork TCP:192.168.1.10:3306 |
sentrySENTRY_SECRET_KEY to random 32 char stringdocker-compose up -ddocker-compose exec sentry sentry upgrade to setup database and create admin userdocker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done laterdocker-compose restart sentry9000| import os | |
| import argparse | |
| import hashlib | |
| import hf_transfer # py -m pip install hf-transfer | |
| CHUNK_SIZE = 10_485_760 | |
| parser = argparse.ArgumentParser(description='HuggingFace fast model downloader') | |
| parser.add_argument('--url', type=str, help='file url') | |
| args = parser.parse_args() |
| import numpy as np | |
| from numpy import pi | |
| # import matplotlib.pyplot as plt | |
| N = 400 | |
| theta = np.sqrt(np.random.rand(N))*2*pi # np.linspace(0,2*pi,100) | |
| r_a = 2*theta + pi | |
| data_a = np.array([np.cos(theta)*r_a, np.sin(theta)*r_a]).T | |
| x_a = data_a + np.random.randn(N,2) |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.
There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.
struct foo {
struct bar {
int x;