Skip to content

Instantly share code, notes, and snippets.

View onedal's full-sized avatar
🎯
Focusing

mega6obep onedal

🎯
Focusing
  • Russia
View GitHub Profile
@onedal
onedal / gist:44f894458f210fd6275ee2bfae977be7
Created August 27, 2019 05:00 — forked from ytbryan/gist:4c4db2f12f2a06b698df
fixing PG::ConnectionBad: FATAL: password authentication failed for user "postgres"
#go to hb_hba.conf
local all postgres ident
#go to psql
sudo -u postgres psql
#enter the following command to set or change the password
ALTER USER postgres PASSWORD 'actual_password';
#go to hb_hba.conf to change this line back
@onedal
onedal / authentication_with_bcrypt_in_rails_4.md
Last active October 10, 2015 05:39 — forked from thebucknerlife/authentication_with_bcrypt_in_rails_4.md
Simple Authentication in Rail 4 Using Bcrypt

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps