Skip to content

Instantly share code, notes, and snippets.

@codinginflow
codinginflow / next-self-hosting-instructions.md
Last active April 14, 2025 04:08
Deploy & secure a Next.js app + Postgres DB on a VPS

Self-Hosting Next.js Tutorial

Follow the instructions below to deploy a Next.js app with a local PostgreSQL database to a VPS, secure it, and connect it to a custom domain with free SSL. Watch the accompanying tutorial on YouTube: https://www.youtube.com/watch?v=2T_Dx7YgBFw

Instructions & commands:

  1. Get your VPS server on Hostinger (Use code CODINGINFLOW for 10% off). Install Ubuntu 24 as the OS and set a root password.
  2. Log into your server as root: ssh root@<your-server-ip>
  3. Update Linux packages: apt update && apt upgrade -y
  4. Create a new user: adduser
@aryanprince
aryanprince / nextjs14-vps-guide.md
Last active March 30, 2025 08:35 — forked from ByteGrad/gist:790455da551e9771d67f8e434cdf54d1
Quickly deploy a Next.js 14 app on a VPS (Droplets, EC2, etc.) with app router, RSCs, and other Next.js features

from aryan: most guides i found online weren't helpful for me, hope this helps tho :)

1. Connect to machine

ssh root@<server-ip-address>

Optional but recommended:

sudo apt update && sudo apt upgrade -y
@erkobridee
erkobridee / 01__second-brain-system.md
Last active March 26, 2025 05:14
Second Brain System and productive useful references
@misostack
misostack / nextjs-cheatsheet.md
Last active March 25, 2025 03:51
NextJS Cheatsheet
@ChipCE
ChipCE / readme.md
Last active March 28, 2025 18:09
Klipper bed mesh on print area only macro install guide

READ THIS FIRST

Adaptive bed mesh is merged into klipper master branch. You can use this feature without this custom macro. Official klipper adaptive bed mesh

Klipper mesh on print area only install guide

What this macro do

  • This macro will dynamically changing the bed mesh area based on the size of the parts will be printed. The fw will only probe on the area that the part will be printed (plus mesh_area_offset value)
@J05HI
J05HI / eBay_Kleinanzeigen_Anzeige_duplizieren.js
Last active April 16, 2025 23:42
Add "reinstate" functionality, refactoring
// ==UserScript==
// @name eBay Kleinanzeigen - Anzeige duplizieren / neu einstellen
// @namespace https://github.com/J05HI
// @description Bietet eine "Anzeige duplizieren / neu einstellen" Funktion beim Bearbeiten einer vorhandenen Anzeige in eBay Kleinanzeigen.
// @icon http://www.google.com/s2/favicons?domain=www.kleinanzeigen.de
// @copyright 2024, J05HI (https://github.com/J05HI)
// @license MIT
// @version 1.4.0
// @match https://www.kleinanzeigen.de/p-anzeige-bearbeiten.html*
// @grant none
@sandren
sandren / tailwind.md
Last active February 28, 2025 13:05
Tailwind CSS best practices

Tailwind CSS best practices

Utility classes

  1. When writing a string of multiple utility classes, always do so in an order with meaning. The "Concentric CSS" approach works well with utility classes (i.e,. 1. positioning/visibility 2. box model 3. borders 4. backgrounds 5. typography 6. other visual adjustments). Once you establish a familiar pattern of ordering, parsing through long strings of utility classes will become much, much faster so a little more effort up front goes a long way!

  2. Always use fewer utility classes when possible. For example, use mx-2 instead of ml-2 mr-2 and don't be afraid to use the simpler p-4 lg:pt-8 instead of the longer, more complicated pt-4 lg:pt-8 pr-4 pb-4 pl-4.

  3. Prefix all utility classes that will only apply at a certain breakpoint with that breakpoint's prefix. For example, use block lg:flex lg:flex-col lg:justify-center instead of block lg:flex flex-col justify-center to make it very clear that the flexbox utilities are only applicable at the

@joelmasters
joelmasters / next_nginx.md
Last active February 10, 2025 01:56 — forked from kocisov/next_nginx.md
How to setup next.js app on nginx with letsencrypt

How to setup next.js app on nginx with letsencrypt/getssl

next.js, nginx, reverse-proxy, ssl

Next.js package setup

Your server.js file should look like the following. Make sure you're serving static files!

const { createServer } = require('http');
const { parse } = require('url');
const next = require('next');