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 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;| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |