This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libsrpos_plugin-0.2$ ./configure | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... /bin/mkdir -p | |
checking for gawk... gawk | |
checking whether make sets $(MAKE)... yes | |
checking build system type... i686-pc-linux-gnu | |
checking host system type... i686-pc-linux-gnu | |
checking how to print strings... printf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from statistics.tasks import test | |
for i in xrange(9999999): | |
test.delay('test - %s' % i) | |
time.sleep(2) | |
i+=1 | |
print i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on http://django-filer.readthedocs.org/en/0.9.2/upgrading.html#from-pre-0-9a3-develop-to-0-9 | |
import sys, os | |
from django.conf import settings | |
from filer.models import File | |
print 'PUBLIC\N' | |
for f in File.objects.filter(is_public=True): | |
sys.stdout.write(u'moving %s to public storage... ' % f.id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getJSON('media/js/markers.json', function(data){ | |
$.each(data.markers, function(i, marker){ | |
if (...) { | |
map.addMarker({ | |
id: i, | |
tags: marker.tag, | |
lat: marker.latitude, | |
lng: marker.longitude, | |
infoWindow: { | |
content: '<h2>' + marker.name + '</h2><p>' + marker.address + '</p>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import urllib2 | |
import contextlib | |
import StringIO | |
from django.core.files.storage import get_storage_class, FileSystemStorage | |
from django.core.files import File | |
from django.conf import settings | |
from galleries.models import GalleryImage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -O http://python-distribute.org/distribute_setup.py | |
python distribute_setup.py | |
curl -O http://pypi.python.org/packages/source/p/pip/pip-0.7.2.tar.gz | |
tar xzf pip-0.7.2.tar.gz | |
cd pip-0.7.2 | |
python setup.py install | |
easy_install pip | |
pip install requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
def pretty_size(size): | |
"size in bytes" | |
size = int(size) | |
units = ' KMGTPE'+string.lowercase[::-1] | |
bytes = 'B' | |
i = 0 | |
while size>1024: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"auto_complete_commit_on_tab": true, | |
"detect_slow_plugins setting": false, | |
"dictionary": "Packages/Language - English/en_GB.dic", | |
"find_selected_text": true, | |
"fold_buttons": false, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# eg qs = Product.objects.exclude(is_prebuy=True) | |
print re.sub(r'\b([A-Z]+)\b', r'\n\1\n\t', str(qs.query)) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN:VCALENDAR | |
X-WR-CALNAME;VALUE=TEXT:guardiancartoons | |
VERSION:2.0 | |
CALSCALE:GREGORIAN | |
BEGIN:VEVENT | |
DTSTART;VALUE=DATE:20110917T00:00:00Z | |
DTEND;VALUE=DATE:20110918 | |
SUMMARY:Martin Rowson on the arrest of UBS 'rogue trader' - cartoon | |
X-GOOGLE-CALENDAR-CONTENT-TITLE:Martin Rowson on the arrest of UBS 'rogue trader' - cartoon | |
X-GOOGLE-CALENDAR-CONTENT-ICON:http://www.guardian.co.uk/favicon.ico |