Skip to content

Instantly share code, notes, and snippets.

View tvaroglu's full-sized avatar
🎯
Focusing

TaylorV tvaroglu

🎯
Focusing
View GitHub Profile
@tvaroglu
tvaroglu / heroku-remote.md
Created September 14, 2021 22:30 — forked from randallreedjr/heroku-remote.md
Add a Heroku remote to an existing git repo

Working with git remotes on Heroku

Generally, you will add a git remote for your Heroku app during the Heroku app creation process, i.e. heroku create. However, if you are working on an existing app and want to add git remotes to enable manual deploys, the following commands may be useful.

Adding a new remote

Add a remote for your Staging app and deploy

Note that on Heroku, you must always use master as the destination branch on the remote. If you want to deploy a different branch, you can use the syntax local_branch:destination_branch seen below (in this example, we push the local staging branch to the master branch on heroku.

$ git remote add staging https://git.heroku.com/staging-app.git
@tvaroglu
tvaroglu / rails http status codes
Created September 6, 2021 19:20 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@tvaroglu
tvaroglu / regenerate_credentials.md
Last active September 16, 2021 21:37 — forked from db0sch/regenerate_credentials.md
How to regenerate the master key for Rails 5.2 credentials

If your master.key has been compromised, you might want to regenerate it.

No key regeneration feature at the moment. We have to do it manually.

  1. Copy content of original credentials rails credentials:show somewhere temporarily.
  2. Remove config/master.key and config/credentials.yml.enc
  3. Run EDITOR=vim rails credentials:edit in the terminal: This command will create a new master.key and credentials.yml.enc if they do not exist.
  4. Paste the original credentials you copied (step 1) in the new credentials file (and save + quit vim)
  5. Add and Commit the file config/credentials.yml.enc
@tvaroglu
tvaroglu / Rails_Checklist.md
Created July 15, 2021 17:22 — forked from ElliotOlbright/Rails_Checklist.md
Rails App checklist

Rails Database Development Checklist

Warning: This checklist does not rely on TDD to build up the rails app. It uses some MVC code snippets, so make sure to replace them with names you use on your project. Most references are from

https://backend.turing.io/module2/misc/blogger
https://github.com/turingschool-examples/task_manager_rails
  1. Create Rails Application
  • From the command line, start a new rails app. For example,
    rails new project_name -T -d="postgresql" --skip-spring --skip-turbolinks
    

Checklist/Rubric

To make a copy of this rubric:

  1. Click the button in the upper right-hand corner that says Fork. This is now your copy of the document.
  2. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.

Part I: Creating Directories and Files; Initializing Git and Pushing to GitHub

  • I named my directories correctly.