I hereby claim:
- I am reverie on github.
- I am ab (https://keybase.io/ab) on keybase.
- I have a public key whose fingerprint is 0CFF 98F7 8E4F D9EF 23FD 425F 3F7F 0E06 8CE1 9593
To claim this, I am signing this object:
function c { git checkout $@; } | |
function b { git branch $@; } | |
alias s="git status" | |
alias d="git diff" | |
alias dc="git diff --cached" | |
alias dv="git diff | vim -" | |
alias l="git log" | |
alias gp="git pull" | |
alias gpu="git push" | |
alias cam="git commit -am" |
import React from "react"; | |
import classNames from "classnames"; | |
// See https://tailwindcss.com/docs/margin/ | |
type MarginSize = "2" | "4" | "8"; | |
// See https://tailwindcss.com/docs/responsive-design/ | |
type ScreenSize = "sm" | "md"; | |
type Config = { |
def extract_first_email(s): | |
""" | |
Assumes `s` is a list of email addresses split by (mixed) spaces or commas. | |
Returns (first_email, rest) where first_email + rest == s, | |
or (None, None) if we don't think this is an email address. | |
""" | |
first_quote = s.find('"') | |
first_at = s.find('@') | |
if first_at == -1: | |
return (None, None) |
#!/usr/bin/env python3 | |
# Give this +x and put it on your $PATH | |
import subprocess | |
import os.path | |
import glob | |
from pathlib import Path | |
@register.filter | |
def short_naturaltime(value): | |
from django.contrib.humanize.templatetags.humanize import naturaltime | |
base = naturaltime(value) | |
if ',' not in base: | |
return base | |
return base.split(',', 1)[0] + ' ago' |
I hereby claim:
To claim this, I am signing this object:
$(document).ready(function() { | |
simplegeo_key = 'TOKEN'; | |
var places_client = new simplegeo.Places12Client(simplegeo_key); | |
var context_client = new simplegeo.ContextClient(simplegeo_key); | |
// Given an address and radius (and the SimpleGeo client), returns | |
// a comma-separated list of zip codes within that radius. | |
function get_nearby_zips(address, radius, places_client, callback) { |
from django.db import models | |
import uuid | |
class UUIDField(models.CharField): | |
""" | |
A field which stores a UUID value in hex format. This may also have | |
the Boolean attribute 'auto' which will set the value on initial save to a | |
new UUID value (calculated using the UUID1 method). Note that while all | |
UUIDs are expected to be unique we enforce this with a DB constraint. |