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 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 / 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 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 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: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:13 — 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) {
var total_count = 0;
// 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:16 — 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 (numPeople) {
var total_count = 0;
// loop through each of the people
for (var counter = 0; counter < numPeople; counter++ ){
// shake each person’s hand who you haven’t shaken yet
@jimthoburn
jimthoburn / mob-coding-challenge.js
Created April 20, 2017 02:19 — 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 (numPeople) {
var total_count = 0;
// loop through each of the people
for (var index = 0; index < numPeople; index++ ){
// shake each person’s hand who you haven’t shaken yet
@jimthoburn
jimthoburn / gulpfile.js
Last active June 21, 2017 20:33
Gulp Resize Images, Example
// https://github.com/gulpjs/gulp
var gulp = require('gulp');
// https://www.npmjs.com/package/gulp-image-resize
var imageResize = require('gulp-image-resize');
var parallel = require("concurrent-transform");
var os = require("os");
@jimthoburn
jimthoburn / save-restore-scroll-position.js
Last active June 14, 2018 18:23
Save & restore scroll position
(function() {
var position
function saveScrollPosition() {
// If we don’t already have a saved scroll position
if (position == null || position <= 0) {
position = window.scrollY
}
}