Skip to content

Instantly share code, notes, and snippets.

@ctailor2
ctailor2 / gist:7685487
Last active December 29, 2015 14:39 — forked from ckampfe/gist:7685397
Testing edits
OBJECTIVE: Build an app that allows for drag-and-drop p2p file transfer between 2 users (1-to-1 user basis).
The users should be anonymous.
The initiating user drags a file to the app window and gets presented with a link to provide to the receiving user.
The initiating user must keep the browser tab open until the file is fully transferred to the receiver.
Receiving user must click a link to initiate download of desired file.
require 'rspec'
describe Cookie do
let(:cookie) { Cookie.new }
context "#initialize" do
it "should create a cookie object" do
cookie.should be_an_instance_of Cookie
end
@ctailor2
ctailor2 / carousel.js
Last active December 28, 2015 01:59 — forked from ksolo/carousel.js
Image Carousel
@ctailor2
ctailor2 / form-validator.js
Last active December 28, 2015 01:49 — forked from ksolo/form-validator.js
Form Validation
// shorthand for $(document).ready();
$(function(){
$("form").on("submit", function(){
event.preventDefault();
var password = $(this).find(":nth-child(4)").val()
var errors = validatePassword(password);
$.each(errors, function(index, value){
$("#errors").append("<li>" + value + "</li>");
});
});
@ctailor2
ctailor2 / zoo.js
Created November 7, 2013 21:10 — 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.
//------------------------------------------------------------------------------------------------------------------
@ctailor2
ctailor2 / zoo.js
Last active December 27, 2015 16:49 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
function Animal(type, num_legs) {
this.name = type;
this.num_legs = num_legs
}
@ctailor2
ctailor2 / index.html
Last active December 27, 2015 16:39 — 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>
<div id="die">
<% if @roll %>
<img src="/<%= @roll.value %>.png" title="<%= @roll.value %>" alt="the roll">
<% end %>
</div>