npm install
gulp
var db = mongoose.connect('mongodb://localhost:27017/DB'); | |
// In middleware | |
app.use(function (req, res, next) { | |
// action after response | |
var afterResponse = function() { | |
logger.info({req: req}, "End request"); | |
// any other clean ups |
// ==UserScript== | |
// @name Instagram image in a new tab | |
// @namespace http://shvalyov.ru | |
// @version 0.1 | |
// @description append download link to photos | |
// @author dshster | |
// @match https://www.instagram.com/* | |
// @grant none | |
// ==/UserScript== |
const margin = 200; | |
const theta = 0.2; | |
function getRandomCoords({ width, height }) { | |
return { | |
top: Math.random() * (width - margin) + margin / 2, | |
left: Math.random() * (height - margin) + margin / 2, | |
}; | |
} |
(function(application, dependencies) { | |
angular.module(application, dependencies); | |
})('application', []); | |
(function(application) { | |
angular.module(application) | |
.controller('SampleController', SampleController); | |
SampleController.$inject = ['$http']; |
var application = 'application'; | |
angular.module(application, ['ngMockE2E']); | |
angular.module(application) | |
.controller('SampleController', function(SampleServices) { | |
var Sample = this; | |
SampleServices.getServerData().then(function(result) { | |
Sample.serverData = result; |
var css = require('./styles.postcss'); |
{ | |
"directory": "Scripts/Components" | |
} |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
inline: { | |
'index.html': ['tpl/*.html'] | |
} | |
}); | |
grunt.registerMultiTask('inline', 'Inline AngularJS templates into single file.', function() { | |
var SCRIPT = '<script type="text/ng-template" id="<%= id %>"><%= content %></script>\n'; |