Skip to content

Instantly share code, notes, and snippets.

@loudnate
loudnate / Dockerfile
Last active October 7, 2017 16:12
DockerHub:loudnate/openaps-dev
# Pull base image
FROM resin/rpi-raspbian:wheezy
MAINTAINER Nathan Racklyeft <loudnate@gmail.com>
# Install dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
git \
python \
@loudnate
loudnate / app.yaml
Created October 9, 2011 19:50
AppEngine app definition for deploying Mel's iWeb project.
application: nateandmel-racklyeft-com
version: 1
runtime: python
api_version: 1
derived_file_type:
- python_precompiled
builtins:
- appstats: on
from django import template
import datetime
register = template.Library()
@register.filter("timeago")
def timeago(value, timestamp = datetime.datetime.utcnow(), suffix = "ago"):
"""
Returns a fuzzy and friendly datestring describing the difference between two dates.
Based on Rails' timeago helper and Ryan McGeary's jQuery.timeago plugin.