Skip to content

Instantly share code, notes, and snippets.

View cafca's full-sized avatar

Vincent Ahrend cafca

View GitHub Profile
@cafca
cafca / config.json
Last active August 29, 2015 14:21 — forked from anonymous/config.json
Bootstrap Custom Configuration
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#0b3954",
"@brand-success": "#1dc849",
@cafca
cafca / real_ip_address.py
Last active December 17, 2015 06:28 — forked from elidickinson/real_ip_address.py
removed trailing whitespace
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):