Skip to content

Instantly share code, notes, and snippets.

View jimthoburn's full-sized avatar

Jim Thoburn jimthoburn

View GitHub Profile
@jimthoburn
jimthoburn / mob-coding-challenge.js
Created April 20, 2017 02:10 — forked from theknoosh/mob-coding-challenge.js
A saved mob programming session with Learn Teach Code!
// If we all shook each others' hands once (and only once),
// how many handshakes would that be??
// Write a function that calculates how many handshakes will
// occur for a given number of people.
function countHandshakes (people) {
// loop through each of the people
for (var counter = 0; counter < people;counter++ ){
// shake each person’s hand who you haven’t shaken yet
@jimthoburn
jimthoburn / mob-coding-challenge.js
Created April 20, 2017 02:08 — forked from theknoosh/mob-coding-challenge.js
A saved mob programming session with Learn Teach Code!
// If we all shook each others' hands once (and only once),
// how many handshakes would that be??
// Write a function that calculates how many handshakes will
// occur for a given number of people.
function countHandshakes (people) {
// loop through each of the people
for (var counter = 0; counter < people;counter++ ){
}
@jimthoburn
jimthoburn / mob-coding-challenge.js
Created April 20, 2017 02:06 — forked from theknoosh/mob-coding-challenge.js
A saved mob programming session with Learn Teach Code!
// If we all shook each others' hands once (and only once),
// how many handshakes would that be??
// Write a function that calculates how many handshakes will
// occur for a given number of people.
function countHandshakes (people) {
// loop through each of the people
for (var counter = 0; counter < people;counter++ ){
}
@jimthoburn
jimthoburn / mob-coding-challenge.js
Created April 20, 2017 01:54 — forked from theknoosh/mob-coding-challenge.js
A saved mob programming session with Learn Teach Code!
// If we all shook each others' hands once (and only once),
// how many handshakes would that be??
// Write a function that calculates how many handshakes will
// occur for a given number of people.
function count(){
// loop through each of the people
for (people = 5; people > )
}
@jimthoburn
jimthoburn / mob-coding-challenge.js
Created April 20, 2017 01:51 — forked from theknoosh/mob-coding-challenge.js
A saved mob programming session with Learn Teach Code!
// Write a function that calculates how many handshakes will
// occur with a given number of people
// It’s my turn! : )
@jimthoburn
jimthoburn / closest.js
Created September 8, 2016 01:24
Find the closest ancestor HTML element that matches a tag name
function closest(element, tagName) {
// If the element is the target
if (element.nodeName.toLowerCase() === tagName) return element;
var ancestor = element;
while ((ancestor = ancestor.parentElement) && ancestor.nodeName && ancestor.nodeName.toLowerCase() !== tagName);
if (ancestor && ancestor.nodeName && ancestor.nodeName.toLowerCase() === tagName) {
return ancestor;
}
@jimthoburn
jimthoburn / pulse.html
Last active August 3, 2016 23:04
Pulsing circle animation
<!doctype html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<title></title>
<style>
@keyframes pulse {
100% {
box-shadow: 0 0 0.25em rgba(77, 85, 148, 1);
}
@jimthoburn
jimthoburn / topics.md
Last active December 28, 2015 20:28
These are topics I’m familiar with or interested in learning more about

Build a flexible, robust web page that performs well in search engines, and works on any device.

Designing in a Web Browser

Create a stunning visual design, using a text editor and a Web browser.

@jimthoburn
jimthoburn / math.html
Last active December 25, 2015 09:39
Math Equations as TeX, rendered with MathJax
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<title>Math Equations as TeX (rendered with MathJax)</title>
<link href='http://fonts.googleapis.com/css?family=Crimson+Text:400,400italic,600,600italic,700,700italic' rel='stylesheet' type='text/css'>
<style>
body {
background: white;
font: 20px/normal 'Crimson Text', serif;
@jimthoburn
jimthoburn / simple-reload.js
Created October 8, 2013 19:12
Reload the main style sheet, for the a page you’re working on. (HINT: Type this in your browser console.) This is useful when you’re working on your CSS, and a full page refresh takes a long time.
document.querySelector('link[href*="application.css"]').href += "#a";