Skip to content

Instantly share code, notes, and snippets.

View maxcruz's full-sized avatar

Max Cruz maxcruz

  • Barcelona, Spain
View GitHub Profile
#!/usr/bin/env python
#*-* encoding: utf-8 *-*
# Algoritmo de la amistad - Sheldon Cooper (The Big Bang Theory)
import random #Modulo para generar numeros de forma aleatoria
class algoritmoAmistad(object):
def __init__(self):
@maxcruz
maxcruz / authentication_with_bcrypt_in_rails_4.md
Created October 18, 2018 07:47 — 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