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
[Unit] | |
Description=Description for this application | |
Requires=network.target | |
After=network.target | |
[Service] | |
WorkingDirectory=/srv/app | |
ExecStart=/usr/bin/npm start | |
Restart=always | |
StandardOuput=syslog |
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
# | |
# A CORS (Cross-Origin Resouce Sharing) config for nginx | |
# | |
# == Purpose | |
# | |
# This nginx configuration enables CORS requests in the following way: | |
# - enables CORS just for origins on a whitelist specified by a regular expression | |
# - CORS preflight request (OPTIONS) are responded immediately | |
# - Access-Control-Allow-Credentials=true for GET and POST requests | |
# - Access-Control-Max-Age=20days, to minimize repetitive OPTIONS requests |
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
getResponseObject = (context) -> | |
# Later we could extend this to decide which ErrorResponse Object it should use | |
# based on the given error instance | |
if context instanceOf Error | |
object = new ErrorResponse context | |
else | |
object = new SuccessResponse context | |
send = (request, response, context) -> | |
object = getResponseObject context |
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 timers = {}; | |
var createGeocodeChangeWhateverFunction = function(timername, $scope) { | |
var timer = timers[timername]; | |
return function($event) { | |
if (timer != null) { | |
clearTimeout(timer); | |
} | |
timers[timername] = timer = setTimeout(function() { | |
timer = null; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
lib-cov | |
*.seed | |
*.log | |
*.csv | |
*.dat | |
*.out | |
*.pid | |
*.gz | |
pids |
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 foo(x, y, z) { | |
bar(1, b); | |
var i = 0; | |
var x = {0: "zero", 1: "one"}; | |
var foo = function () { | |
} | |
if (!i > 10) { | |
for (var j = 0; j < 10; j++) { | |
switch (j) { | |
case 0: |
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
// Wrong: | |
if (condition) alert(foo); | |
// Correct: | |
if (condition) { | |
alert(foo); | |
} | |
//------------------------------------------------- |
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
# $Id$ | |
# Maintainer: Sergej Pupykin <[email protected]> | |
# Maintainer: Bartłomiej Piotrowski <[email protected]> | |
# Contributor: Miroslaw Szot <[email protected]> | |
# nginx-pagespeed maintainer: Ludovic Fauvet <[email protected]> | |
_cfgdir=/etc/nginx | |
_tmpdir=/var/lib/nginx | |
pkgname=nginx-pagespeed |
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 geocode(address) { | |
if(address) { | |
var response = Maps.newGeocoder().setRegion('at').geocode(address); | |
var longLat = {}; | |
var l; | |
Logger.log("address: " + address); | |
if (response.status === "OK") { | |
Logger.log("response " + JSON.stringify(response)); | |
if((l = response.results[0].geometry.location)) { | |
longLat.lng = l.lng; |