Amazon S3 is a great (and cheap) content storage and delivery service, used by millions of websites and applications around the world. However, their permissions system can be opaque to new users, and difficult to understand, due to the variety of ways you can set permissions, and inconsistent terminology in different UIs. This post aims […]
Understanding Technology
How does Git rebase work?
I use git’s rebase command daily, it’s an invaluable tool for maintaining a clean and sane Git history. However, most people find it difficult to understand, or use it incorrectly, as it’s not the clearest command to use. The first thing to understand, is that rebasing typically refers to two different (but similar) operations: “Rebasing […]
Understanding Arrays
celine bags Arrays & hash maps are one of the cornerstones of modern computer programming. It’s almost impossible to write a useful program without them, so it’s critical that you understand them when you’re getting started with programming. In this post, I’ll explain arrays & hash maps, how they work, their differences, and when to […]
Basics Of Scaling: Cache Everything
I do a lot of work on websites that needs to scale fairly well, but I tend to use that mentality for every project. Part of scaling is performance, and the better your app performs (e.g. the more requests per second it can handle) the cheaper it is. One very easy way to improve your […]
Understanding the PHP-FPM status page
PHP-FPM has a very useful feature that allows you to setup a status page to view that status of a PHP-FPM pool, configurable using the option pm.status_path. Most people who have worked with PHP-FPM have probably heard of this setting, and maybe even used it (some tools such as Munin require it for metrics). Here […]
How Linux pipes work under the hood
Piping is one of the core concepts of Linux & Unix based operating systems. Pipes allow you to chain together commands in a very elegant way, passing output from one program to the input of another to get a desired end result. Here’s a simple example of piping: ls -la | sort | less The […]
Understanding how Linux creates processes
A friend recently read my post on how bash redirection works, but didn’t quite understand my explanation of how bash launches another process and sets stdin/stdout/stderr, so this is a follow up post. Linux creates every process using the fork(2) or clone(2) syscalls. The only way to create a process is to fork your current […]
So what is /proc anyways?
I’ve been using Linux for years, but I’ve never really known was /proc was or why certain commands used it. I’m not sure why I’ve never looked it up in the past, but I recently did and I thought I’d share. /proc isn’t a “real” directory, in the sense that it doesn’t exist on disk. […]
How bash redirection works under the hood
Have you ever wondered how bash redirection works under the hood? Redirection itself is pretty straightforward. Using bash, you can redirect a file to a process’ stdin, or redirect a process’ stdout/stderr to a file or other file descriptor (including things like redirecting stderr to stdout, because both are file descriptors). Redirection looks like this: […]
Basics Of Scaling: Load Balancers
Lately, I’ve been doing a lot of work on systems that require a high degree of scalability to handle large traffic spikes. This has led to a lot of questions from friends and colleagues on scaling, so I thought I’d do a blog series on the basics of scaling .