Skip to content

Instantly share code, notes, and snippets.

@vanxrice
vanxrice / app.js
Created October 25, 2015 17:45
Google Analytics Localhost Exclusion
if (document.location.hostname !== 'localhost') {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXX', 'auto');
ga('send', 'pageview');
}
@vanxrice
vanxrice / app.yaml
Last active August 29, 2015 14:13 — forked from darktable/app.yaml
improved app.yaml for python27, added default skips, node_modules/*, and app/* to skip_files
application: your-app-name-here
version: 1
api_version: 1
runtime: python27
threadsafe: true
default_expiration: "30d"
skip_files:
- ^(.*/)?#.*#$