This is an opinionated handbook on how I migrated all my Rails apps off the cloud and into VPS.
This is how I manage real production loads for my Rails apps. It assumes:
- Rails 7+
- Ruby 3+
- PostgreSQL
- Ubuntu Server 24.04
- Capistrano, Puma, Nginx
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 |
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 |
This is an opinionated handbook on how I migrated all my Rails apps off the cloud and into VPS.
This is how I manage real production loads for my Rails apps. It assumes:
If you're looking to swap the Ctrl + Cmd keys in Ubuntu 16.04 either just because, or because you're using VirtualBox with an Ubuntu guest and an OSX host, then the answer you're looking for is here. Courtesy of Joel Koh.
nano /usr/share/X11/xkb/symbols/pc
# Unix (Terminal) | |
open -a "Google Chrome" --args --disable-gpu-vsync --disable-frame-rate-limit | |
# Windows (Command prompt) | |
start chrome --args --disable-gpu-vsync --disable-frame-rate-limit |
import SwiftUI | |
// 1. Use looped H/VStacks to create a grid | |
// 2. Conditionally increase spacing to grow/shrink the grid | |
// 3. Calculate the distance of each dot to the center and use the value to stagger the animation | |
//4. Add random delay on top of the staggered delay value | |
struct ContentView: View { | |
// const & state |
The purpose of this document is to serve as a reference for:
How to Write an Open Source JavaScript Library course by Kent C. Dodds
Watch the series at egghead.io, if you haven't.
//////////////////////////////////////////////////////////////////////////////// | |
// Create a directory called "pages" next to | |
// this file, put markdown files in there, and | |
// then run: | |
// | |
// ``` | |
// $ node build.mjs | |
// ``` | |
// | |
// Then deploy the "build" directory somewhere. |