Skip to content

Instantly share code, notes, and snippets.

View davidteren's full-sized avatar
👋
Hey, nice to meet you.

David Teren davidteren

👋
Hey, nice to meet you.
View GitHub Profile
@davidteren
davidteren / index.html.erb
Last active March 22, 2021 08:25
For Article on Medium medium.com/p/46f24daf1b26
<div>
<nav x-data="{ open: false }" @keydown.window.escape="open = false" class="bg-gray-800">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0">
<h3 class="text-gray-300 text-lg ">MyApp</h3>
</div>
<div class="hidden md:block">
<div class="ml-10 flex items-baseline">
@davidteren
davidteren / Rails, Puma & Nginx.md
Last active January 16, 2025 21:19
Example setup for Puma with Nginx in a Rails app

In the apps config/puma.rb file:

Change to match your CPU core count
# Check using this on the server => grep -c processor /proc/cpuinfo
workers 4

# Min and Max threads per worker
threads 1, 6

app_dir = File.expand_path('../..', FILE)