- nginx
- nginx-x-rid-header module (https://github.com/newobj/nginx-x-rid-header)
We want to track image downloads from client side and in javascript we cannot get the header values:(.
function gimmeFullscreenMethod(){ | |
var el = document.documentElement, openMethod, cancelMethod, video; | |
openMethod = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen; | |
cancelMethod = document.cancelFullScreen || document.webkitCancelFullScreen || document.mozCancelFullScreen || document.msCancelFullScreen; | |
if( openMethod ){ | |
return { | |
open: openMethod, | |
cancel: cancelMethod, |
{ | |
"scripts": { | |
"eslint": "LIST=`git diff-index --name-only HEAD | grep .*\\.js | grep -v json`; if [ \"$LIST\" ]; then eslint $LIST; fi" | |
}, | |
"devDependencies": { | |
"pre-commit": "0.0.7", | |
"eslint": "~0.5.1" | |
}, | |
"pre-commit": [ | |
"eslint" |
var mongoCol = require( "mongo-col" ), | |
mongoStream = require( "mongo-stream" ), | |
mongoInsertStream = mongoStream( mongoCol( "piped-collection", null, { | |
dbOptions:{ | |
safe: true | |
} | |
})), | |
Logger = require( "bunyan" ); | |
new Logger({ |
user www-data; | |
worker_processes 1; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
sendfile on; |
We want to track image downloads from client side and in javascript we cannot get the header values:(.
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> | |
<title>Menetrend Online</title> | |
<link id="screencss" href="style01.css" rel="stylesheet" type="text/css" media="screen"> | |
<link id="printcss" href="print.css" rel="stylesheet" type="text/css" media="print"> | |
<script type="text/javascript" src="scripts.php"></script> |
/* | |
URLs: | |
http://localhost:3000/arrive?foo=bar&utm_source=smart-redir | |
*/ | |
var redirect = require('redirect-with-params'); | |
var express = require('express'); | |
var app = express(); | |
app.use(redirect({ |
var Agent = {}; | |
Agent.check = function() { | |
var events = JSON.parse(this.memory('events') || '[]'); | |
this.log('memory is: (' + typeof events + '):' + JSON.stringify(events)); | |
var len = events.length; | |
var tags = (this.options('tags') || '').split(','); | |
var count = parseInt(this.options('count'), 10) || tags.length; | |
var delimeter = this.options('delimeter') || ','; | |
var tagPrefix = this.options('tagPrefix') || this.options('tagprefix') || ''; | |
if (len === 0) { |
{ | |
"scripts": { | |
"such-custom-script": "echo custom-script", | |
"presuch-custom-script": "echo pre-custom-script", | |
"postsuch-custom-script": "echo post-custom-script" | |
} | |
} |