Skip to content

Instantly share code, notes, and snippets.

View klamping's full-sized avatar

Kevin Lamping klamping

View GitHub Profile
@klamping
klamping / ng-diaper.js
Last active August 29, 2015 14:02
ng-diaper
angular.directive('ngDiaper', function ($rootScope, $timeout, wipesSvc) {
return {
replace: true,
priority: 1000,
restrict: 'E',
// TODO for some reason, even though we're trying to isolate the scope, properties inside this directive keep leaking out
scope: true,
template: '<form name="diaper" ng-submit="changeDiaper()"><input type="submit" id="plumbing"></form>',
link: function (scope, el) {
scope.changeDiaper = function () {
/* jshint node: true */
describe('rxFeedback', function () {
var scope, compile, rootScope, el, feedbackSvc, apiUrl, httpMock, notifySvcMock, screenshotSvcMock, elScope;
var validTemplate = '<rx-feedback></rx-feedback>';
var theScreenshot = 'the screenshot';
var feedback = {
type: {
label: 'type'
},
@klamping
klamping / prs.js
Created September 16, 2014 00:14
List all open PRs for repos
#!/usr/bin/env node
// Run with `node prs.js`
// or chmod the file and run via `./prs.js`
/*jshint node:true*/
var https = require('https');
var util = require('util');
var options = {
@klamping
klamping / part-1.md
Last active August 29, 2015 14:07
How I've Messed up in Angular

Part 1 - Factories vs. Services

I thought I understood the difference between Factories and Services fairly clearly. I made the assumption that factories, by their name, were useful for pumping out new instances of objects every time you asked for them. I also held the belief that services were simply a nomenclature for defining a set of utility functions for tracking state or some sort of data.

Well, forget what I just said, because I had it wrong. Factories and services are actually pretty similar in functionality (assuming I'm not getting it wrong yet again). They both serve the purpose of instantiating a singleton object; something that you're going to use as a single instance throughout your page lifecycle.

The main difference between factories and services is how you define them. Services should build off of the this object. Factories should return a custom object with functionality attached to it.

Service:

Name ideas:
Beurocracy
Too many cooks
Mechanic of game
Each player adds X tiles to a common deck. Tiles are shuffelled and X number are drawn randomly as a community. The tiles that are drawn are actions taken by the player whose tile was drawn.
Example actions:
Attack
- Quell monsters
Team vs. performance
Last 3 games
Last game
- Regression to mean
Travelling East
Injuries
@klamping
klamping / scrollerific.js
Created February 2, 2015 16:32
Scroll thingy
// Container element to add/remove class to
var container = $('body')
// this is the class that will be added to the body tag when the page is scrolled down
var scrollClass = "window-scrolled";
// how far down the page needs to be scrolled for the class to be added
var positionTrigger = 10;
$(window).scroll(function (event) {
http://zachholman.com/posts/office-floor-plans/
http://www.targetprocess.com/blog/2014/11/create.html
http://www.paperplanes.de/2014/12/10/from-open-to-minimum-vacation-policy.html
https://www.linkedin.com/pulse/20141113211429-10486099-stop-trying-to-incentivize-your-employees-to-be-more-like-you
https://hbr.org/2014/11/bureaucracy-must-die/
https://medium.com/@redheadjessica/a-step-by-step-guide-to-using-trello-for-team-retrospectives-da327daf7e47
http://www.helpscout.net/blog/candor-in-workplace/
http://www.bhorowitz.com/a_good_place_to_work
http://sethgodin.typepad.com/seths_blog/2015/02/i-dont-care-enough-to-give-you-constructive-feedback.html
http://apievangelist.com/2012/01/12/the-secret-to-amazons-success-internal-apis/
Busymind Mindfulness for your busy life
Slow down. Search your body for tension.
This could be at your shoulders, your back, or your mouth.
Release the tension let your body sink in to relaxation.
Now focus on your breath.
As you breath, feel your chest expand and contract. Feel the air move in and out.
---
layout: post
title: "Add Narration to your Slide Deck with HTML5 Audio"
date: 2013-06-17 10:11
comments: true
categories: ["JavaScript", "HTML5 Audio", "Multimedia"]
author: "Kevin Lamping (@klamping)"
---
**Most presenter will share their slide deck on the web after their presentation. But many times the slides are only a shell of the real talk. Fortunately, with HTML5 audio, we can add our voice back to our slides and recreate the real presentation.**