Skip to content

Instantly share code, notes, and snippets.

View Abdulwahaab710's full-sized avatar
🇵🇸
Palestine will be free ✌🏽

Abdulwahaab Ahmed 🍉 Abdulwahaab710

🇵🇸
Palestine will be free ✌🏽
View GitHub Profile
@Abdulwahaab710
Abdulwahaab710 / waitForKeyElements.js
Created April 17, 2020 19:46 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }

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