I hereby claim:
- I am kblum on github.
- I am kblum (https://keybase.io/kblum) on keybase.
- I have a public key whose fingerprint is C1E6 D946 725A 4329 CE66 EBF7 6283 F22F 3B71 1060
To claim this, I am signing this object:
from django.utils.decorators import method_decorator | |
from django.views.decorators.cache import cache_page | |
def CachePage(cls=None, **cache_kwargs): | |
""" | |
Apply the ``cache_page`` decorator to all the handlers in a class-based | |
view that delegate to the ``dispatch`` method. | |
Optional arguments | |
``timeout`` -- Cache timeout, in seconds.`` |
import urllib, urllib2, cookielib | |
from BeautifulSoup import BeautifulSoup | |
import re | |
def get_ebucks_balance(username, password): | |
"""Scrape eBucks website to get balance and return as an integer""" | |
# create opener | |
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookielib.CookieJar())) | |
urllib2.install_opener(opener) |
#!/usr/bin/env bash | |
set -e | |
if [ -z "$1" ]; then | |
echo "Must specify app name as argument; exiting" | |
exit | |
fi | |
APP_NAME=`echo "$1" | tr '[:upper:]' '[:lower:]'` # convert to lowercase |
I hereby claim:
To claim this, I am signing this object:
Synchronise Google Earth places across multiple computers using Dropbox. The instructions are currently specific to OS X but can be extended to Windows and Linux.
The ~/Library/Application\ Support/Google\ Earth
is moved to a google-earth-sync
directory under a Dropbox container directory. A symbolic link is then made to this directory.
The entire Google Earth data directory needs to be synchronised instead of just the myplaces.xml
file because of how Google Earth backs the file up. During the backup process after quitting Google Earth, myplaces.kml
is renamed to myplaces.backup.kml
and then copied to myplaces.kml
. If only the myplaces.kml
file were to be synchronised with a symbolic link then the synchronisation process would break after one cycle because the backup file would then be the symbolic link.
#!/usr/bin/python | |
import logging | |
import argparse | |
import os | |
import re | |
import calendar | |
def transform_name(fn): |