Skip to content

Instantly share code, notes, and snippets.

View mackenco's full-sized avatar

Colin MacKenzie mackenco

  • New York
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mackenco on github.
  • I am colinm (https://keybase.io/colinm) on keybase.
  • I have a public key whose fingerprint is D37C 2909 70C8 0A04 F258 6AFE 87D8 F031 1E64 E2EA

To claim this, I am signing this object:

I want to write a function that converts meters to feet.
1. Let's discuss before typing. What are the inputs and outputs to the function?
2. What's the formula to convert a meter to a foot?
3. What's an appropriate name for our function?
4. We've completed the prep work. Let's write the function together.
Write a function that simulates the rolling of a 9 sided die.
1. What are the inputs and outputs to the function? Write these as a comment at the top of your file.
2. What's the formula to get a random number between 1 and 9?
3. What's an appropriate name for your function?
4. Write the function in JavaScript. Call it a couple times to ensure it works correctly.
@mackenco
mackenco / gist:bc9ef211c999567966a6
Created December 7, 2015 20:58
Some FUN equality tests
var num1 = true;
if (num1) {
console.log("number 1");
}
var num2 = false;
if (num2) {
console.log("number 2");
}
@mackenco
mackenco / index.html
Created December 14, 2015 21:29 — forked from anonymous/index.html
JS Bin // source http://jsbin.com/qomoji
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.pgraph {
background-color: lightgreen;
}
@mackenco
mackenco / index.html
Last active November 16, 2016 19:01
Exported from Popcode. Click to import: https://popcode.org/?gist=f624d55063170d1c1b9a110b2c057a42
<!DOCTYPE html>
<html>
<head>
<title>Homer Simpson</title>
</head>
<body>
<div id="header">
<img id="profile-picture" src="https://pbs.twimg.com/profile_images/609439993094770690/MqfzEbtj.jpg">
<h1 id="title">Homer's Profile</h1>
</div>
<!DOCTYPE html>
<html>
<head>
<title>Homer Simpson</title>
</head>
<body>
<div id="header">
<img id="profile-picture" src="https://pbs.twimg.com/profile_images/609439993094770690/MqfzEbtj.jpg">
<h1 id="title">Homer's Profile</h1>
</div>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div class="all" id="one"></div>
<div class="all" id="two"></div>
<div class="all" id="three"></div>
<div class="all" id="four"></div>
<!DOCTYPE html>
<html>
<head>
<title>Homer Simpson</title>
</head>
<body>
<div id="header">
<img id="profile-picture" src="https://pbs.twimg.com/profile_images/609439993094770690/MqfzEbtj.jpg">
<h1 id="title">Homer's Profile</h1>
</div>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div class="all" id="one"></div>
<div class="all" id="two"></div>
<div class="all" id="three"></div>
<div class="all" id="four"></div>