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
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. |
| """ | |
| 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) |
| #!/bin/bash | |
| # Script is needed because my default firewall rules are messed up and after | |
| # every restart, docker containers can't make connections to the host, notably | |
| # preventing debuggers like xdebug from attaching. | |
| # If networking fails in your containers but works in others, rm and re-create the | |
| # docker network that container is bound to. | |
| set -euo pipefail |