Skip to content

Instantly share code, notes, and snippets.

View briancarycom's full-sized avatar

Brian Cary briancarycom

View GitHub Profile
@iscott
iscott / simple_authentication_rails_5_bcrypt_and_has_secure_password.md
Last active November 14, 2024 10:54
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
@frangucc
frangucc / UP
Created June 17, 2014 02:59
Getup
#!/bin/sh
echo Press any key to install \#UP!
read
#STEP 1 -- @@@@@@ CHECK FOR XCODE & INSTALL IF NEEDED @@@@@@
echo "Preparing #UP! shell scripts, this may take a sec..."
#TODO 1: download a copy of xcode from my mirror.
echo "STOP! this script if you haven't downloaded XCODE 5.0.2 and installed the DMG file - get XCODE running - future builds of UP will include XCODE"
#TODO 2: launch bash installation visualization in chrome window. Visualize local machine receving various componenents.
#TODO 3: use curl to try and visualize the time it's going to take from the terminal window.
#TODO 4: create some recovery process or wrap this in a check to see if this package is installed - would not want to try and download this twice.
@steveclarke
steveclarke / capybara.md
Created April 10, 2012 17:32
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
Code
$("button").single_double_click(function () {
alert("Try double-clicking me!")
}, function () {
alert("Double click detected, I'm hiding")
$(this).hide()
})