Skip to content

Instantly share code, notes, and snippets.

View influx6's full-sized avatar
🎯
Focusing

Ewetumo Alexander influx6

🎯
Focusing
View GitHub Profile
@influx6
influx6 / latency.txt
Created November 11, 2024 02:31 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
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
@influx6
influx6 / latency.txt
Created November 11, 2024 02:31 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
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
@influx6
influx6 / exit_the_cloud.md
Created October 6, 2024 13:46 — forked from rameerez/exit_the_cloud.md
☁️ How I got off the cloud and migrated everything from AWS to a VPS in Hetzner

☁️ How I got off the cloud and migrated everything from AWS to a VPS in Hetzner

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
@influx6
influx6 / UbuntuSwapCtrlCmdKeys.md
Created July 28, 2024 12:00 — forked from kurozael/UbuntuSwapCtrlCmdKeys.md
How to swap the Ctrl and Cmd keys when using Ubuntu.
@influx6
influx6 / pbpaste-pbcopy-ubuntu.md
Created July 28, 2024 09:54 — forked from diegopacheco/pbpaste-pbcopy-ubuntu.md
pbpaste && pbcopy for Ubuntu Linux 20.04

Install

sudo apt-get install xclip -y

Create Alias

alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'

Try out

# 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
@influx6
influx6 / ContentView.swift
Created August 23, 2023 23:07 — forked from alexwidua/ContentView.swift
SwiftUI Grid Animation
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
@influx6
influx6 / setup.md
Last active July 3, 2023 12:16 — forked from akella/setup.md
WEBGL Tools Setuo
@influx6
influx6 / write-an-open-source-js-lib.md
Created April 22, 2023 16:15 — forked from oncode/write-an-open-source-js-lib.md
How to Write an Open Source JavaScript Library
////////////////////////////////////////////////////////////////////////////////
// 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.