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
import { Directive, ElementRef, Input } from '@angular/core'; | |
declare var ImgCache: any; | |
@Directive({ | |
selector: '[image-cache]' | |
}) | |
export class ImageCacheDirective { | |
constructor ( | |
private el: ElementRef |
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
from fabric.api import local, settings | |
from fabric.colors import red, green, yellow | |
from fabric.contrib.console import prompt | |
PACKAGE_NAME = 'YourProjectName' | |
DROPBOX_LOCATION = '~/Dropbox/YourLocation/' | |
BUILDER = 'YourId' | |
KEYSTORE = '~/someLocation/%(builder)s.keystore' % {'builder': BUILDER} | |
APK_LOCATION = 'platforms/android/bin/' |
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
/* | |
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes. | |
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed | |
* | |
* Usage: | |
* $ casperjs screenshots.js http://example.com | |
*/ | |
var casper = require("casper").create(); |
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
YourModule.factory('CordovaReady', function() { | |
return function (fn) { | |
var queue = []; | |
var impl = function () { | |
queue.push(Array.prototype.slice.call(arguments)); | |
}; | |
document.addEventListener('deviceready', function () { | |
queue.forEach(function (args) { |
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
YourModule.factory('Notification', function($rootScope){ | |
return { | |
alert: function(message, callback){ | |
if(navigator.notification !== undefined){ | |
navigator.notification.alert(message, | |
function(){ | |
$rootScope.$apply(callback()); | |
}); | |
} else { | |
alert(message); |