Skip to content

Instantly share code, notes, and snippets.

View iscott's full-sized avatar

Ira Herman iscott

View GitHub Profile
@iscott
iscott / simple_authentication_rails_5_bcrypt_and_has_secure_password.md
Last active March 15, 2024 03:23
Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password

Cheat Sheet: Simple Authentication in Rails 6 with has_secure_password

The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.

First the simplest/core layers, then optional layers depending on which features/functionality you want.

Specs
AUTHOR Ira Herman
LANGUAGE/STACK Ruby on Rails Version 4, 5, or 6
#RPS Lab Requirements
* Web Page/Web App that lets you play Rock Paper Scissors
* 2 Players (on the same screen)
* Win Logic (Tells the user who won)
* Custom styling (Fonts, Background, Images)
* Pictures for Rock, Paper, and Scissors
##Super Optional Bonus Challenge
* Play vs Computer (AI)
@iscott
iscott / item_spec.rb
Created March 2, 2015 18:37
Testing scopes with RSPEC
require 'rails_helper'
RSpec.describe Item, :type => :model do
before(:each) do
@purchased_item = Item.create(
:name => "Item1",
:qty => 1,
:is_purchased => true
)
@iscott
iscott / gist:e88616c9c0f1422e1ae3
Created August 7, 2014 03:45
Web Wrapper App
import UIKit
class ViewController: UIViewController {
@IBOutlet var webView: UIWebView!
@IBAction func goBack(sender: AnyObject) {
webView.goBack()
}