Post

Ubuntu server setup for RoR
December 11, 2023 07:28Server config below. Startting with Ubuntu 22.04LTS. Install Nginx and set SSL certificates Install Nginx sudo apt install nginx Open firewall ports sudo ufw allow 'Nginx HTTP' Set up Ngi...

Nginx Server Block - Before Certbot
December 11, 2023 07:29Reference server block for getting Nginx running in order to execute Certbot and aquire SSL certificates. server {listen 80;listen [::]:80;server_name example.com;root /var/www/example.com;index in...
Postgres Cheatsheet
December 11, 2023 09:41Link to source -> postgres-cheatsheet.md PSQL Magic words: psql -U postgres Some interesting flags (to see all, use -h or --help depending on your psql version): -E: will ...

Ubuntu Systemd service for Ruby on Rails
December 12, 2023 07:23This is an example of a systemd service file for starting a Ruby on Rails app automatically. File location is /etc/systemd/system [Unit]Description=ror-app-nameAfter=network.target [Service]Type=si...

Nginx Server Block - After Certbot
December 12, 2023 07:33Here is an example of a basic Nginx server block, after modification by Certbot. server {server_name example.com;root /var/www/example.com;index index.html index.htm; location / {proxy_pass http://...

Nginx Server Block - Before Certbot with PHP
December 13, 2023 10:10Example Nginx server block including PHP, before SSL setup with Certbot. server {listen 80;listen [::]:80;server_name example.com;root /var/www/example.com;index index.html index.htm index.php; loc...

Seeding Ruby on Rails App with MYSQL dump in CSV format
December 13, 2023 14:59bin/rails generate model Damageinspections ticketid:integer date:datetime address:string photo:string bin/rails db:migrate rails db:seed bin/rails console Create /lib...
Postgres Database Backup and Restore
December 18, 2023 17:17I moved some old web page data from some MYSQL tables that which had been updated and edited over the years. When diplayed on the new site the strange characters were showing up in the ...

Ruby on Rails Naming Conventions
January 13, 2024 07:51Routes - lowercase, with underscores as needed between words Controllers - CamelCase, plural, and append the word "Controller" at the end. Model Class - Singular with the first letter of ...