Skip to content

Instantly share code, notes, and snippets.

View cnocon's full-sized avatar
:octocat:
Professionally developing

Cristin O'Connor cnocon

:octocat:
Professionally developing
View GitHub Profile
@cnocon
cnocon / README.md
Created July 30, 2020 20:38 — forked from elclanrs/README.md
VanillaJS popover with autoposition
@cnocon
cnocon / rspec_rails_cheetsheet.rb
Created August 5, 2016 03:19 — forked from them0nk/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet (include capybara matchers)
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)
@cnocon
cnocon / zoo.js
Created February 27, 2014 17:16 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work.
//------------------------------------------------------------------------------------------------------------------
@cnocon
cnocon / zoo.js
Created February 27, 2014 16:29 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work.
//------------------------------------------------------------------------------------------------------------------

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.
class Car
@@WHEELS = 4
def initialize(args)
@color = args[:color]
@wheels = @@WHEELS
end
def drive
@status = :driving
end
def brake
@cnocon
cnocon / 0.2.1-boggle_class_from_methods.rb
Last active December 27, 2015 17:29 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1 boggle class challenge
class BoggleBoard
def initialize (board)
@board=board
end
def create_word(*coords)
puts coords.map { |coord| @board[coord.first][coord.last]}.join("")
end