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:
WITH RECURSIVE transitive_dependencies AS ( | |
SELECT package_id AS dependency_id, package_id AS root_id | |
FROM dependencies | |
WHERE kind = 'runtime' | |
UNION ALL | |
SELECT d.package_id, td.root_id | |
FROM dependencies d | |
JOIN transitive_dependencies td ON td.dependency_id = d.package_id AND td.dependency_id <> td.root_id -- Avoid self-joins | |
WHERE d.kind = 'runtime' | |
), |
<%@ language="Javascript" %> | |
<script language="javascript" runat="server" src='json2.js'></script> | |
<script language="javascript" runat="server" src='stringExtensions.js'></script> | |
<script language="javascript" runat="server" src='contentNego.js'></script> | |
<script language="javascript" runat="server"> | |
(function() { | |
// In an ASP scenario, this fn gets "exported" |
$ cd /dev/shm/
$ git clone [email protected]:denoland/pm-benchmark.git
$ cd pm-benchmark/
$ mkdir testbed
$ cp -R fixture/* testbed/
$ cd testbed/
$ sync
$ sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
[sudo] password for andrew:
// will be called via bun-parallel-setup.ts | |
let i = 0; | |
Bun.serve({ | |
port: process.env.PORT || 8000, | |
development: false, | |
// Share the same port across multiple processes | |
// This is the important part! |
hi, i'm daniel. i'm a 15-year-old with some programming experience and i do a little bug hunting in my free time. here's the insane story of how I found a single bug that affected over half of all Fortune 500 companies:
If you've spent some time online, you’ve probably come across Zendesk.
Zendesk is a customer service tool used by some of the world’s top companies. It’s easy to set up: you link it to your company’s support email (like [email protected]), and Zendesk starts managing incoming emails and creating tickets. You can handle these tickets yourself or have a support team do it for you. Zendesk is a billion-dollar company, trusted by big names like Cloudflare.
Personally, I’ve always found it surprising that these massive companies, worth billions, rely on third-party tools like Zendesk instead of building their own in-house ticketing systems.
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
const SQLITE3_OK = 0; | |
const SQLITE3_ROW = 100; | |
const SQLITE3_OPEN_READWRITE = 0x00000002; | |
const SQLITE3_OPEN_CREATE = 0x00000004; | |
const SQLITE3_OPEN_MEMORY = 0x00000080; | |
const SQLITE3_OPEN_PRIVATECACHE = 0x00040000; | |
const SQLITE3_OPEN_NOMUTEX = 0x00008000; | |
function assert (condition, message) { | |
if (!condition) { |
In order to be able to build v8 from scratch on Windows for x64, please follow the following steps.
These instructions were updated to work with Windows 11 Build 10.0.22621, but this should also work on WInodws 10
NOTE: While the Chrome team does provide decent documentation, there are some nuances and other additional steps that must be done for v8 to compile on Windows.
Documentation: