Skip to content

Instantly share code, notes, and snippets.

# interact with retail IoT devices
## iot devices and their associated github repos
### collection of upcoming and released iot devices
IOTLIST<http://iotlist.co/>
### sample of connected devices and github repos for your hacking pleasure
The following devices have preset applications that interface with them, but the open source community have found take a look
behind the curtain and programatically leverage these and other devices like them outside of their prepackaged software.
var returnEvensOnly = function(array,counter,result) {
if (counter===undefined){counter=0;}
if (result===undefined){result=[];}
if (counter <= array.length) {
if(array[counter]%2===0){result.push(array[counter]);}
return returnEvensOnly(array,counter+1,result);
} else {
return result;
}
};

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@jennyvallon
jennyvallon / scaleImagesDynamically.txt
Last active March 23, 2016 15:59
Dynamically scale down images based on their original height and width
CHANGE IMAGE SIZE RELATIVE TO ITSELF AND NOT A PARENT
FORGOT THE WEIRD BOUNDING BOX ISSUE WITH TRANSFORM: SCALE();
THOSE WHO DON'T UNDERSTAND JQUERY/JS SCROLL DOWN TO LINE 32
function shrinkImage(idOrClass, className, percentShrinkage){
'use strict';
$(idOrClass+className).each(function(){
var shrunkenWidth=this.naturalWidth;
var shrunkenHeight=this.naturalHeight;
$(this).height(shrunkenWidth*percentShrinkage);