You can see the various files added in this gist to really do the bulk of the work.
The important bits seem to be:
yarn add esbuild-sass-plugin
| import { navigator } from "@hotwired/turbo"; | |
| import { Controller } from "stimulus"; | |
| import { useMutation } from "stimulus-use"; | |
| export default class extends Controller { | |
| connect() { | |
| useMutation(this, { attributes: true, childList: true, subtree: true }); | |
| } | |
| mutate(entries) { |
| # app/helpers/application_helper.rb | |
| module ApplicationHelper | |
| def declare_fa_icon(options, anchor_name) | |
| fa_icon(options, data: { 'fa-symbol': anchor_name }) | |
| end | |
| def use_fa_icon(anchor_name, text) | |
| %Q(<svg class="icon-fa-xs"><use xlink:href="##{anchor_name}"></use></svg>#{text}).html_safe | |
| end |
| # Generate Random Passwords | |
| curl 'https://www.random.org/passwords/?num=2&len=24&format=plain&rnd=new' | |
| # Create deploy user | |
| sudo adduser deploy | |
| sudo adduser deploy sudo | |
| su deploy | |
| cd ../deploy/ | |
| # Generate ssh keys |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
If you're encountering ping github.com failing inside WSL with a Temporary failure in name resolution, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.
This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf.
DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.
To upgrade WSL, follow these steps,
Run rails new --help to see all of the options you can use to create a new Rails application:
Output for Rails 8+
Usage:
rails COMMAND [options]
You must specify a command:
| :call plug#begin('~/.vim/plugged') | |
| Plug 'morhetz/gruvbox' | |
| call plug#end() | |
| " ------------------------------- General settings | |
| set nocompatible |
| // NOTE: MySQL does not support transactional DDL (https://dev.mysql.com/doc/internals/en/transactions-notes-on-ddl-and-normal-transaction.html) | |
| // You should use this with a (cool) DBMS such as PostgreSQL. | |
| module.exports = { | |
| up: (queryInterface, Sequelize) => { | |
| return queryInterface.sequelize.transaction((t) => { | |
| return Promise.all([ | |
| queryInterface.addColumn('table_name', 'column_name1', { | |
| type: Sequelize.STRING | |
| }, { transaction: t }), |
| class CategoriesController < ApplicationController | |
| def fields | |
| render json: Field.where(category_id: params[:id]).order(:id) | |
| end | |
| end |