Skip to content

Instantly share code, notes, and snippets.

@NenadP
NenadP / closure.js
Created November 22, 2015 16:46
Closure example
/*
* Closure example
*/
(function () {
function addOne() {
var num = 0;
return function () {
return num += 1;
};
}
@NenadP
NenadP / json_to_html.js
Created November 12, 2015 13:47
Json to HTML angular filter simple demo
angular.module("myApp").filter("jsonToHtml", [
function () {
return function (json) {
var html = "",
/**
* @param element {Object} - content inside an element
* @returns {String}
* @private
*/
@NenadP
NenadP / gist:40f26e933485824245dc
Last active August 29, 2015 14:09
scss keyframe animation mixin
/*
Handy for keyframe animations (spritesheed cycling for example)
Usage example:
@include keyframe-animation(animation-name, .8s, 5, infinite);
@include animation-keys("animation-name") {
from { background-position: 0 0; }
to { background-position: 0 -200px; }
}