Skip to content

Instantly share code, notes, and snippets.

View gearsdigital's full-sized avatar

Steffen Giers gearsdigital

View GitHub Profile
@gearsdigital
gearsdigital / gist:1958811
Created March 2, 2012 14:41 — forked from anonymous/gist:1904282
Ant With Colors in OS X Terminal
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
ant () { command ant -logger org.apache.tools.ant.listener.AnsiColorLogger "$@" | sed 's/2;//g' ; }
@gearsdigital
gearsdigital / functions.php
Created September 27, 2012 09:35
Wordpress Custom Menu
<?php
/**
* Split the menu to top level items and the children of the
* current active parent.
* @see http://helperclass.blogspot.de/2011/11/creating-separate-sub-menu-in-wordpress.html
*/
class SplitMenu_Walker_Nav_Menu extends Walker_Nav_Menu {
private $menu = false;
@gearsdigital
gearsdigital / Clean Up “Open With” Menu
Created November 29, 2012 10:47
Clean Up “Open With” Menu
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
@gearsdigital
gearsdigital / gist:4466732
Created January 6, 2013 12:01
Starting Samsung Channel List Editor: SamyGO-ChanEdit-v54cd-MacOSX_Oracle_x64_cocoa_by_loggn.de.jar
java -d64 -XstartOnFirstThread -jar SamyGO-ChanEdit-v54cd-MacOSX_Oracle_x64_cocoa_by_loggn.de.jar
App.CollectionRoute = Ember.Route.extend({
model: function (params) {
return this.get('store').find('collection', params.collection_id);
},
serialize: function(record, options){
console.log(record, options)
}
});
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>