Skip to content

Instantly share code, notes, and snippets.

View patroqueeet's full-sized avatar

Jirka Schäfer patroqueeet

View GitHub Profile
#! /bin/bash
# print status
git status
locale
virtualenv .ve
VIRTUAL_ENV_DISABLE_PROMPT=true source .ve/bin/activate
# os pkgs
# sudo aptitude remove -y postgresql-9.4 postgresql-9.4-postgis-2.1 postgresql-9.4-postgis-2.2 postgresql-9.4-postgis-scripts postgresql-client-9.4 postgresql-client-common postgresql-common postgresql-contrib-9.4 postgresql-server-dev-9.4
In [11]: while True:
for t in Thumbnail.objects.all():
fname = os.path.basename(t.name)
dname = os.path.dirname(t.name)
h.join(root, dname)):.isfile(os.path.join(root, dname, fname)) and os.path.exists(os.path
for x in listdir(os.path.join(root,dname)):
if x[3:] == os.path.basename(t.name):
e, x[3:]) print "renaming", os.path.join(root,dname,x), os.path.join(root,dname
)) os.rename(os.path.join(root,dname,x), os.path.join(root,dname, x[3:])
time.sleep(3)