Skip to content

Instantly share code, notes, and snippets.

View kayline's full-sized avatar

Molly Trombley-McCann kayline

View GitHub Profile
@kayline
kayline / index.html
Last active December 17, 2015 16:19 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
@kayline
kayline / tutorial.md
Last active December 18, 2015 00:59

Views: Sinatra vs Rails

###Auto-Matching### Inside a given controller, each action will by default render a template with the same name as the action

class BooksController < ApplicationController
  def index
    #will automatically render app/views/books/index.html.erb
 end
@kayline
kayline / route_check.rb
Last active August 29, 2015 13:56
Write an Rspec test to assert that all your public API endpoints have matching rspec_api_documentation tests.
class RouteCheck
attr_reader :routes, :world
def initialize(routes: nil, world: nil)
@routes = routes
@world = world
end
def filtered_routes
collect_routes do |route|
@kayline
kayline / jsdom_input_range.js
Created September 13, 2024 18:37
JSDOM Input Range Bug
const {JSDOM} = require("jsdom"); //jsdom version 20.0.3
let dom = new JSDOM('<input type="range" id="root_foo" label="foo" placeholder="" step="1" min="10" max="100" class="form-control" value="3.14">');
//Expect the following to be 3.14, but retunrs 10
dom.window.document.getElementById("root_foo").value