This directive allows you to write you modal windows inline in your html code without writing the same boilerplate code for open and closing a popup. It also supports view caching and is scope destroy aware so you do not need to hide it manually when you switching a view.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var chainGang = require('chain-gang'); | |
var chain = chainGang.create(); | |
var task = function(worker) { | |
worker.finish(); | |
} | |
chain.add(task, function(err) { | |
console.log('Never called'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var chainGang = require('chain-gang'); | |
var queue = chainGang.create(); | |
var longTask = function(text) { | |
return function(worker) { | |
setTimeout(function() { | |
console.log(text); | |
worker.finish(); | |
}, 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window, document, undefined) { | |
var $table = document.getElementById('field'); | |
function columnClick(col) { | |
} | |
function buildTable() { | |
var $row, $col, i, j; | |
for (i = 0; i < ROWS; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('directives.wymeditor', []) | |
.constant('WYM_EDITOR_OPTIONS', { | |
lang: 'de', | |
skin: 'compact', | |
iframeBasePath: 'vendor/wymeditor/iframe/pretty/', | |
logoHtml: '', | |
containersHtml: '', | |
classesHtml: '', | |
toolsItems: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code goes here | |
angular.module('app', []) | |
.controller('AppCtrl', function($scope) { | |
$scope.content = '<p>Hallo Welt</p>'; | |
}) | |
.constant('KEY', { | |
'BACKSPACE': 8, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
find $1 -type f -print0 | xargs -0 stat -f'%z' | awk '{b+=$1} END {print b}' | awk '{ sum=$1 ; hum[1024**3]="Gb";hum[1024**2]="Mb";hum[1024]="Kb"; for (x=1024**3; x>=1024; x/=1024){ if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x];break } }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('components.spinner-tracker', [ | |
'ajoslin.promise-tracker' | |
]) | |
.directive('csspinner', function (spinnerTracker) { | |
return { | |
scope: { | |
type: '@csspinner' | |
}, | |
link: function (scope, element) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert image.png -define icon:auto-resize="256,128,96,64,48,32,16" icon.ico |
OlderNewer