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 |
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, | |
}; | |
} |
// ==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== |
(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'); |
'use strict'; | |
var application = 'application'; | |
var dependences = ['ngMockE2E']; | |
angular.module(application, dependences) | |
.config(['$compileProvider', function($compileProvider) { | |
$compileProvider.debugInfoEnabled(false); | |
}]) |
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element
or the /deep/
path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" href="styles.css"> | |
<title>Filereader</title> | |
</head> | |
<body> | |
<div id="dragarea" class="drag-area"></div> |