Skip to content

Instantly share code, notes, and snippets.

View code-206's full-sized avatar

Andreas Cichocki code-206

View GitHub Profile

How to deploy a Rails 7.1 app with Postgres and Kamal on a single server

I think you have looked at the tutorial from Mr. Heinemeier Hansson at least once or twice and have a similar setup.

rails new kamal_pg --css tailwind --skip-test --database=postgresql

cd kamal_pg
@code-206
code-206 / kamal-commands.html
Created November 1, 2023 17:22
Simple list of kamal commands
<!DOCTYPE html>
<html>
<head>
<title>Kamal commands</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<style>
pre {
margin-left: -8.5rem;
}
@code-206
code-206 / ConicGradientEqualSplits.css
Created August 21, 2023 09:11
This collection of SCSS and CSS snippets provides various methods to generate conic gradient backgrounds for classes named .creative-x. Depending on your preferences and project needs, you can choose between SCSS for dynamic generation or direct CSS for ready-to-use styles.
/*
* Conic Gradients Equal Splits
* ---------------------------------------------
* Here are a series of classes showcasing the evolution of a conic gradient.
* Initiated from a 315-degree angle, each gradient progresses clockwise,
* incorporating an additional color from a predefined set.
*
* These classes are perfect for those who either can't or don't wish to use SCSS.
* To use, simply integrate the necessary classes into your stylesheet and assign them to your elements.
*/
@code-206
code-206 / debug_turbo_listener_controller.js
Last active August 18, 2023 18:21
A simple Stimulus controller to help debug and log Turbo-Drive events. This controller listens to various Turbo events and logs messages to the console, aiding in the development and debugging process.
// // Add this to your HTML to activate the Stimulus controller
//
<div data-controller="debug--turbo-listener"></div>
// application.js (or wherever you're importing your controllers)
//
import DebugTurboListenerController from "./debug_turbo_listener_controller";
application.register("debug--turbo-listener", DebugTurboListenerController);
// With folder