Skip to content

Instantly share code, notes, and snippets.

View lrjbrual's full-sized avatar
🏠
Working from home

ryanjeff lrjbrual

🏠
Working from home
View GitHub Profile
@lrjbrual
lrjbrual / webpacker_rails.md
Created March 23, 2020 10:15 — forked from maxivak/webpacker_rails.md
Webpack, Yarn, Npm in Rails
@lrjbrual
lrjbrual / letsencrypt_2019.md
Created July 1, 2019 08:03 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@lrjbrual
lrjbrual / heroku_pg_db_reset.md
Created June 4, 2019 16:31 — forked from zulhfreelancer/heroku_pg_db_reset.md
How to reset PG Database on Heroku?

How to reset PG Database on Heroku?

  • Step 1: heroku restart
  • Step 2: heroku pg:reset DATABASE (no need to change the DATABASE)
  • Step 3: heroku run rake db:migrate
  • Step 4: heroku run rake db:seed (if you have seed)

One liner

heroku restart; heroku pg:reset DATABASE --confirm APP-NAME; heroku run rake db:migrate

@lrjbrual
lrjbrual / contact-form.md
Created May 20, 2019 07:07 — forked from stevecondylios/contact-form.md
Create and Deploy a Contact Form to Production in Rails 5

Create a Contact Form in Rails 5

This is a complete, step-by-step tutorial showing how to create a fully functional contact form in production in rails 5. Rather than reinvent things, the following borrows from the best available documentation and tutorials (most notably, this tutorial on making a contact form in development). The finished contact form can be viewed here.

This tutorial uses:

  • heroku for deployment,
  • gmail for the mailer, and
  • github for version control

It would be a good idea to create a new gmail account to use for your mailer now, if you haven't already. If you haven't yet got a heroku account and installed the heroku CLI, it would be easiest to do so now.

@lrjbrual
lrjbrual / Capistrano-Deployment-Recipe.rb
Created August 27, 2018 14:41 — forked from mrrooijen/Capistrano-Deployment-Recipe.rb
a "base" Capistrano Rails Deployment Recipe. Use it to deploy your Rails application. It is also easily expandable. So feel free to grab this Recipe and add your own tasks/customization!
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
@lrjbrual
lrjbrual / digitalocean.md
Created July 19, 2018 11:45 — forked from JamesDullaghan/digitalocean.md
Deploy rails app to digitalocean with nginx, unicorn, capistrano & postgres

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh root@123.123.123.123

Add ssh fingerprint and enter password provided in email

@lrjbrual
lrjbrual / ruby_on_rails_deployment.md
Created July 19, 2018 11:38 — forked from zentetsukenz/ruby_on_rails_deployment.md
Deploy Ruby on Rails application with Docker Compose and Capistrano with ease

#Docker

##Files and Folders.

|
|\_ app
|...
|\_ docker
| |
@lrjbrual
lrjbrual / http-benchmark.md
Created March 6, 2018 12:01 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@lrjbrual
lrjbrual / postgres-cheatsheet.md
Created February 21, 2018 19:42 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@lrjbrual
lrjbrual / notes.md
Created May 6, 2017 19:27 — forked from sixfeetover/notes.md
MacOS Sierra upgrade for Rubyists

Upgrading to Sierra for Ruby Devs

Often when upgrading to the latest OS X MacOS you have to do a few things to account for changing to underlying libraries. Here are the post-upgrade steps I took to get back to a fully operational state. I use homebrew and rbenv to manage my environment.

1. Get your Developer Command line tools upgraded.

To do this just run

$ xcode-select --install