Skip to content

Instantly share code, notes, and snippets.

View gearsdigital's full-sized avatar

Steffen Giers gearsdigital

View GitHub Profile
angular.module('services', [])
.factory('State', function ($rootScope) {
'use strict';
var state;
var broadcast = function (state) {
$rootScope.$broadcast('State.Update', state);
};
var update = function (newState) {
// Post repeat directive for logging the rendering time
angular.module('myApp').directive('postRepeatDirective',
['$timeout',
function($timeout) {
return function(scope) {
if (scope.$first)
window.a = new Date(); // window.a can be updated anywhere if to reset counter at some action if ng-repeat is not getting started from $first
if (scope.$last)
$timeout(function(){
console.log("## DOM rendering list took: " + (new Date() - window.a) + " ms");
@gearsdigital
gearsdigital / SassMeister-input.scss
Created June 11, 2015 12:11
Generated by SassMeister.com.
// ----
// libsass (v3.2.4)
// ----
// Mappy breakpoints
// -----------------
// Output media query with focus on min-width, max-width, min-height and max-height.
// Other media rules are passed as the second argument in a map
//
// @author Zell Liew
this.getCategory = function(){
//2. use async : test key input is idMenu
me.listCategory = async.map([1], helper.categoryInMenu, function(err, result){
return result;
});
return me.listCategory;
}
@gearsdigital
gearsdigital / SassMeister-input-HTML.html
Created August 4, 2015 07:19
Generated by SassMeister.com.
<h1>Headline</h1>
@gearsdigital
gearsdigital / SassMeister-input.scss
Created August 4, 2015 07:19
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
/*! ========================================================================
QUANTITY QUERIES FOR SASS
-------------------------
Author: Indrek Paas <@indrekpaas>
@gearsdigital
gearsdigital / SassMeister-input-HTML.html
Created September 2, 2015 20:22
Generated by SassMeister.com.
<h1>Headline</h1>
@gearsdigital
gearsdigital / SassMeister-input-HTML.html
Last active September 2, 2015 20:27
Generated by SassMeister.com.
<h1>Headline</h1>
@gearsdigital
gearsdigital / SassMeister-input.scss
Created September 2, 2015 20:27
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// all credits to bootstrap
$grid-columns: 12;
@mixin float-grid-columns($class, $i: 1, $list: ".col-#{$class}-#{$i}") {
@for $i from (1 + 1) through $grid-columns {
@gearsdigital
gearsdigital / SassMeister-input.scss
Created September 2, 2015 20:30
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// all credits to bootstrap
//
//
// I want to generate something like this:
// http://sassmeister.com/gist/1d3659803d5833e75709