Skip to content

Instantly share code, notes, and snippets.

@kevincolten
kevincolten / post.md
Created November 11, 2015 02:51
@post Here's a new Post

Hello!

@kevincolten
kevincolten / Todo.js
Created October 22, 2015 23:44
Todo App
'use strict';
$(document).ready(function() {
$('form').on('submit', function (e) {
e.preventDefault();
var todoText = $(this).find('#todo').val();
createTodo(todoText);
$(this).find('#todo').val('');
});
@kevincolten
kevincolten / midterm.js
Created October 22, 2015 23:32 — forked from CLofton/midterm.js
This is the midterm for the JS Section 2 class.
//Front End Intermediate Section 2 Midterm
//Directions: Write your answers in the space provided after the word answer.
//1. What is a data type that can have only the values true or false? Provide an example.
//Answer:
@kevincolten
kevincolten / Cars.js
Last active October 21, 2015 14:10
Car Objects
function Car(color) {
this.color = color;
this.tires = 4;
this.drive = function() {
console.log("VVRRROOOMMM!!!")
}
}
function Driveway(maxCars) {
@kevincolten
kevincolten / index.html
Last active November 1, 2015 18:05
Laura + Kevin Wedding Site
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Laura + Kevin</title>
<!--Import Google Icon Font-->
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
@kevincolten
kevincolten / MastermindClassNotes.js
Last active October 7, 2015 13:27
Mastermind Class Notes
'use strict';
var prompt = require('prompt');
prompt.start();
var colors = require('colors/safe');
var board = [
]
@kevincolten
kevincolten / clock.js
Last active September 22, 2015 03:44
Clock
function displayTime() {
var d = new Date();
var h = d.getHours();
var m = d.getMinutes();
var s = d.getSeconds();
var meridiem = "AM";
if( (h > 7) && (h < 19) ) {
// document.body.style.backgroundColor="#80d4ea";
$('body').css('background-color', "#80d4ea");
@kevincolten
kevincolten / PigLatin.js
Created September 19, 2015 15:07
Pig Latin App
'use strict';
var prompt = require('prompt');
prompt.start();
prompt.get(['word'], function(err, result) {
var word = result['word'];
var vowelIndex = word.indexOf('a');
if ( (word.indexOf('e') > -1 && word.indexOf('e') < vowelIndex) || (vowelIndex === -1) ) {
@kevincolten
kevincolten / .gitignore
Last active August 29, 2019 17:19
gclean.sh: Figure out the default branch on GitHub and remove merged branches locally and remotely. killPort.sh: Pass in a port number and close process living on that port.
.DS_Store