Skip to content

Instantly share code, notes, and snippets.

@Colt
Colt / gist:6735032
Last active December 24, 2015 03:09 — forked from featherart/gist:6734826
Colt's Quiz. He is sad now.
# The ideal range of your motor cycle speed 20 - 55. Over 55 is SCAREE!
# Check if your moto_speed is within that range using boolean (&&, ||)
# operators and comparison operators (== =< >= !=)
# if your moto_speed variable is in the right range print out a good
# message, aka "Wheee!" Otherwise print out an appropriate response.
# Your code goes below:
if moto_speed >=20 && moto_speed <=55
@Colt
Colt / gist:6782996
Created October 1, 2013 18:36
Hover Code
<!DOCTYPE html>
<html>
<head>
<style>
a {
color: white;
text-decoration: none;
font-size: 40px;
}
@Colt
Colt / gist:6830621
Created October 4, 2013 18:40
Colt's JS Exercises
/**
* Javascript Exercise: Objects
*/
/**
* Question 1:
* Modify the "booleanValue" function so that it returns "true" when it's called.
*/
function booleanValue() {
return true;
@Colt
Colt / debug_1.md
Last active December 24, 2015 17:09 — forked from OfTheDelmer/debug_1.md

#Debugging (Use The Duck… )

Find the errors in the following

1.)

@Colt
Colt / gist:6862924
Created October 7, 2013 05:26
Colt's Puppies Homework!
<html>
<head>
<title>!Quiz - Week 2</title>
</head>
<body>
<center>
<h1>Puppies - wait, is that a puppy?! </h1>
<img id="daPuppies" src="http://www.pomsky.org/wp-content/uploads/2013/03/97c0ca628ce111e2876222000a9f0a1b_7-300x300.jpg" width="300" height="auto" position="absolute" />
<h3> don't forget to open your Chrome console </h3>
<button onclick="grow();">Bigger Puppies</button>
@Colt
Colt / gist:6874912
Created October 7, 2013 21:03
Ajax Movies Lab
$(function(){
//alert("JQUERY LOADED!");
//CHANGE THE DEFAULT BEHAVIOR OF THE FORM
$('form').on("submit", function(event) { //do something whenever a form is submitted
event.preventDefault(); //prevents the default submit behaviour. no longer refreshes page.
var searchTerm = $('input').val(); //targets the only input and saves its value
alert(searchTerm);
@Colt
Colt / gist:6893726
Created October 8, 2013 23:40
CSS for ToDo List
body {
width: 750px;
font-family: "Helvetica Neue" Helvetica, sans-serif;
margin: 50px auto;
}
.red {
color: red;
text-decoration: line-through;
}
@Colt
Colt / notes.md
Created October 28, 2013 20:27
GroupGo Refactoring Notes

#GroupGo Refectoring Notes

In your create method in the Entries Controller, remove this code:

	if params[:email]
		puts "*"*50
		#p params
	end		

Also, remove this in your Submit method:

@Colt
Colt / gist:7567442
Last active December 28, 2015 21:49
Colt's Lesson Plan

Lab/Homework 11/19/13

Design and deliver a lesson on JS callbacks

Today's assignment is to prepare a lesson on callbacks in Javascript. You should assume your students have a basic understanding of JS syntax, variables and functions but have never encountered an asynchronous function and have never heard the word 'callback'.

We suggest you cover the following topics in order:

# Building Ruby Familiarity
# In this exercise you will take a first look at some common commands in Ruby
# The idea here is to build familiary with Ruby syntax
# This will likely be the first time you've seen some of these commands
# Just type them in and see the displayed output
# Steps:
# 1. Open up a new terminal window
# 2. Launch irb