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
// ==UserScript== | |
// @name UTM param stripper | |
// @author Paul Irish | |
// @namespace http://github.com/paulirish | |
// @version 1.1 | |
// @description Drop the UTM params from a URL when the page loads. | |
// @extra Cuz you know they're all ugly n shit. | |
// @include http://* | |
// ==/UserScript== |
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
@mixin gradient($from, $to) { | |
background-color: $from; /* fallback/image non-cover color */ | |
background-image: -moz-linear-gradient($from, $to); /* Firefox 3.6+ */ | |
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to)); /* Safari 4+, Chrome 1+ */ | |
background-image: -webkit-linear-gradient($from, $to); /* Safari 5.1+, Chrome 10+ */ | |
background-image: -o-linear-gradient($from, $to); /* Opera 11.10+ */ | |
// extras from http://www.colorzilla.com/gradient-editor/ | |
background: -ms-linear-gradient(top, $from 0%,$to 100%); /* IE10+ */ | |
background: linear-gradient(to bottom, $from 0%,$to 100%); /* W3C */ | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$from', endColorstr='$to',GradientType=0 ); /* IE6-9 */ |
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
from flask import Request | |
class ProxiedRequest(Request): | |
""" | |
`Request` subclass that overrides `remote_addr` with Frontend Server's | |
HTTP_X_FORWARDED_FOR when available. | |
""" | |
@property | |
def remote_addr(self): |
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
// utmstrip.js strips utm_* strings from the URL bar of your site, but afer Google Analytics | |
// has had a chance to grab them. Based on Paul Irish's utm-stripping user script. | |
// | |
// Source: https://gist.github.com/elidickinson/9128677 | |
// | |
// Install Notes: | |
// - This script should run *after* you have added all your "_trackPageview" or "_trackEvent" | |
// calls to the _gaq variable. | |
// - It doesn't matter of Google Analtyics has actually finished loading yet, but if you | |
// you tell it to strip the utm_* strings before _trackPageview sees them, it won't know |