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
/** | |
* For creating a numbered folder inside /deploys, | |
* shoving in the contents of /dist and for symlinking to when happy. Eg: | |
* /deploys/2 | |
* /www --> symlinks to --> /deploys/2 | |
*/ | |
gulp.task('deploy', function (cb) { | |
var deploys = fs.readdirSync('./deploys'); | |
var version = 1; | |
if (deploys.length) { |
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
# Prerender server with S3 cache | |
FROM dockerfile/nodejs | |
RUN apt-get update -y | |
RUN apt-get install -y \ | |
python2.7 python-pip \ | |
libfreetype6 libfontconfig | |
RUN cd / && git clone https://github.com/prerender/prerender |
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
// | |
// Glyphicons for Bootstrap | |
// | |
// Since icons are fonts, they can be placed anywhere text is placed and are | |
// thus automatically sized to match the surrounding child. To use, create an | |
// inline element with the appropriate classes, like so: | |
// | |
// <a href="#"><span class="glyphicon glyphicon-star"></span> Star</a> | |
// Import the fonts |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
ngtemplates: { | |
yourModuleName: { | |
options: { | |
// This will add a / so make sure you ng-include="/app/blah.tpl.html" etc | |
prefix: '/' | |
}, | |
cwd: '<%= yeoman.src %>', | |
src: 'app/{,**/}*.tpl.html', |
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
'use strict'; | |
angular.module('myApp').service('UserService', function($http, $q, $location) { | |
var self = { | |
identity: { | |
id: 'guest' | |
}, |
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
<div class="form-group" ng-class="{'has-error': stepForm.email.$invalid && (stepForm.email.$dirty || stepForm.submitted), 'has-success': !stepForm.email.$invalid, 'has-feedback': (stepForm.email.$invalid && stepForm.email.$dirty) || !stepForm.email.$invalid || stepForm.submitted}"> | |
<div class="col-md-12"> | |
<input type="email" placeholder="{{ 'Email' | translate }}" class="form-control" ng-model="user.email" name="email" required> | |
<span class="glyphicon form-control-feedback" ng-class="{'glyphicon-ok': !stepForm.email.$invalid, 'glyphicon-remove': stepForm.email.$invalid && (stepForm.email.$dirty || stepForm.submitted)}" ng-show="(stepForm.email.$invalid && stepForm.email.$dirty) || !stepForm.email.$invalid || stepForm.submitted"></span> | |
<p class="help-block error" ng-show="stepForm.email.$error.required && (stepForm.email.$dirty || stepForm.submitted)">{{ 'This field is required' | translate }}</p> | |
<p class="help-block error" ng-show="stepForm.email.$error.email && (stepForm.email.$dirty || stepForm.s |
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
'use strict'; | |
angular.module('myApp').directive('perspectiveBack', function($window) { | |
return { | |
link: function(scope, element, attrs) { | |
var distance = attrs.distance || 2; | |
element.css({ | |
'background-image': 'url(' + attrs.foreground +'), url(' + attrs.background + ')', |
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
'use strict'; | |
angular.module('myApp').controller('ItemCtrl', function ($scope, ItemService) { | |
$scope.items = ItemService.items; | |
ItemService.load().then(function() { | |
console.log('Items are loaded:', $scope.items); | |
}); | |
}); |
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
<?php | |
return array( | |
// This should be an array of module namespaces used in the application. | |
'modules' => array( | |
'SlmLocale', | |
'Application', | |
), | |
// These are various options for the listeners attached to the ModuleManager | |
'module_listener_options' => array( |
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
<?php | |
namespace ApplicationTest\Service; | |
use PHPUnit_Framework_TestCase; | |
use ApplicationTest\Bootstrap; | |
use Application\Service; | |
use Application\Entity; |