Imagine a fresh linux installation. You may want to run a program.A program is a file on a disk. A process is a running instance of that program. Why do we want isolation?Security, Fault containment, Multi-tenancy Step 0: chroot: first steps towards IsolationOne of the oldest isolation tools in Linux is chroot, which changes the…
All posts by theptrk
Make an AI Coding Agent in python
I’m inspired by Anthropics Claude Code which started as a developer tool for their own engineers.So the goal today: Make the minimal AI Coding Agent, then use that to build towards a self improving AI Coding Agent. The end of this tutorial will be written by your new agent 🧠. Minimal requirements for an AI…
How to make your python cli tool available across your computer
TLDR: Make tool executable and put it in your PATH Say you have a python cli tool stored somewhere on your computer. To make this assessable anywhere, that tool must be in one of the $PATH file paths. (print it with “echo $PATH”). Option 1: Add the path to that CLI to your PATH Option…
iOS Speech Recognition (SFSpeechRecognizer)
The iOS Speech framework provides functionality to convert audio to text. This audio can be real-time or pre-recorded. Transcription models are hosted on device with more powerful ones available from Apple servers. How does it work with real time audio? For audio you need to import AVFoundation Flow: Microphone → AVAudioEngine (captures) → Audio Buffers…
Django S3 Pre Signed URLs
How much memory does my server use uploading files? Say you are creating a voice recording app and a user records 30 minutes audio clip and sends it to your django server. How much system memory do you eat up? The browsers media capture will record in its favored compressed audio format and send about…
Django Stripe integration tutorial – high level
High level flow of recurring product Django entities vs Stripe entities On the django side you’ll need a user column to store the tier of your user With stripe, you interact based on their entities. Note: below you only own “Django user” Concept Purpose Customer Represents our Django user on Stripe Product + Price Recurring…
Creating a dotfiles repo
Your zshrc on one computer is different than the next. Don’t do that. Create a repo called “dotfiles” and put your zshrc, vimrc, and other quality of life dot files into a version controlled home. Now when you make improvements, you can pull down and iterate on every computer.
quick openai call from the terminal
Summary How do create “ai” executable You use vim. How do create “aiv” executable. Same steps as above.
Claude Code First Impressions
Claude is my main AI coding tool now. Its terminal based and writes code one file at a time so I can review changes. Tips Note: How to download claude code (link)
Docker Beginner Tutorial
Let’s assume you are sold on Docker – you need and love Docker. How is it used? On your computer:– install docker (docker desktop is most popular, podman is gaining ground) – develop an application adjusting your Dockerfile– use Dockerfile to build a “image” – a portable package of your app– test locally by running…