-
Back up
A few things to think about:
- media
- photos, music, and videos should all be on external drive
- projects/code
- media
- make sure all Git repos are pushed up
select * | |
from item_occurrence | |
where timestamp >= unix_timestamp() - 24 * 60 * 60 | |
and request.url like '%mydomain.com%' |
source /usr/local/git/contrib/completion/git-completion.bash | |
alias g="git"; __git_complete g _git | |
alias l="git status" | |
alias d="git diff"; __git_complete d _git_diff | |
alias ds="git diff --cached" | |
alias m="git commit -m " | |
alias am="git commit -am " | |
alias a="git add " | |
alias o-="git checkout --" | |
alias o="git checkout"; __git_complete o _git_checkout |
function delete-pyc() { | |
find . -name '*.pyc' -delete | |
} | |
function pull-latest-master() { | |
git checkout master; git pull origin master | |
git submodule update --init | |
git submodule foreach --recursive 'git checkout master; git pull origin master &' | |
until [ -z "$(ps aux | grep '[g]it pull')" ]; do sleep 1; done | |
} | |
function update-code() { |
import hotshot.stats | |
import sys | |
DEFAULT_LIMIT = 200 | |
def profile(filename, limit=DEFAULT_LIMIT): | |
print "loading profile stats for %s" % filename | |
stats = hotshot.stats.load(filename) | |
# normal stats |
from PIL import Image | |
from PIL.ExifTags import TAGS, GPSTAGS | |
def get_exif_data(image): | |
"""Returns a dictionary from the exif data of an PIL Image item. Also converts the GPS Tags""" | |
exif_data = {} | |
info = image._getexif() | |
if info: | |
for tag, value in info.items(): | |
decoded = TAGS.get(tag, tag) |