Skip to content

Instantly share code, notes, and snippets.

View scytherswings's full-sized avatar

Andrew Newell scytherswings

  • Indiana
View GitHub Profile

#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

{65=>[:A], 198=>[:AE], 508=>[:AEacute], 482=>[:AEmacron], 63462=>[:AEsmall], 193=>[:Aacute], 63457=>[:Aacutesmall], 258=>[:Abreve], 7854=>[:Abreveacute], 1232=>[:Abrevecyrillic], 7862=>[:Abrevedotbelow], 7856=>[:Abrevegrave], 7858=>[:Abrevehookabove], 7860=>[:Abrevetilde], 461=>[:Acaron], 9398=>[:Acircle], 194=>[:Acircumflex], 7844=>[:Acircumflexacute], 7852=>[:Acircumflexdotbelow], 7846=>[:Acircumflexgrave], 7848=>[:Acircumflexhookabove], 63458=>[:Acircumflexsmall], 7850=>[:Acircumflextilde], 63177=>[:Acute], 63412=>[:Acutesmall], 1040=>[:Acyrillic, :afii10017], 512=>[:Adblgrave], 196=>[:Adieresis], 1234=>[:Adieresiscyrillic], 478=>[:Adieresismacron], 63460=>[:Adieresissmall], 7840=>[:Adotbelow], 480=>[:Adotmacron], 192=>[:Agrave], 63456=>[:Agravesmall], 7842=>[:Ahookabove], 1236=>[:Aiecyrillic], 514=>[:Ainvertedbreve], 913=>[:Alpha], 902=>[:Alphatonos], 256=>[:Amacron], 65313=>[:Amonospace], 260=>[:Aogonek], 197=>[:Aring], 506=>[:Aringacute], 7680=>[:Aringbelow], 63461=>[:Aringsmall], 63329=>[:Asmall], 195=
@scytherswings
scytherswings / Results_from_example.txt
Last active January 6, 2016 15:13
Stackoverflow Benchmark
user system total real
OP_5: length: 53, results: first: 1, second: 3, fourth: 6, first: 2, second: 4,
0.000000 0.000000 0.000000 ( 0.000017)
Mudasobwa_5: length: 62, results: first: 1, second: 3, fourth: 6, first: 2, second: 4, second: 5
0.000000 0.000000 0.000000 ( 0.000038)
Cary_5: length: 62, results: first: 1, second: 3, fourth: 6, first: 2, second: 4, second: 5
0.000000 0.000000 0.000000 ( 0.000033)
Rustam_5: length: 52, results: first: 1second: 3fourth: 6first: 2second: 4second: 5
0.000000 0.000000 0.000000 ( 0.000020)
Wand_5: length: 47, results: first: 1,second: 3,fourth: 6,first: 2,second: 4
; It is recommended that you place this file outside of web root.
; Values besides Integers and boolean values need to be surrounded with single quotes.
[network_details]
local_server_ip = '127.0.0.1' ; dont include http://
wan_domain = 'example.com' ; don't include http://
ping_ip = '8.8.8.8' ; IP address for the server to ping to get a sense of connection quality. By default it's Google's DNS service.
wan1_ip = '4.2.2.4'
wan2_ip = '3.3.3.3'