• Yahoo increases Flickr's storage to 1 Tera Byte

    With a move reminiscing of Google’s 1GB Inbox (Gmail) back at 2004,flickr
    Yahoo is attempting to set a new standard when it comes to Photo storage.

  • New Langauge added to App Engine - PHP

    A few new things were introduced on Google I/O yesterday.appengine_with_php

  • Slugifying German string with Python

    I'm working on this project that has some German titles, and a lot of irregularities inside them
    (question marks, underscores, etc.)
    Because I have to refer the object (in this case product) by some sort of understandable name, I've decided to slugify the title
    (basically turn "THIS EXAMPLE!!" to "this-example") While I'm already doing that, I wanted to cleverly switch the "ä,ö,ü,ß" to "ae,oe,ue,ss" accordingly.
    I'm pretty sure this might be useful to someone, and it's pretty harmless to share it so...
    this gist was born, and the code is:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    
    # -*- coding: utf-8 -*-
    def replace_all(text, dic):
        for replace_with, replace_what in dic.iteritems():
            if type(replace_what) is list:
                for letter in replace_what:
                    text = text.replace(letter,replace_with)
            else:
                text = text.replace(replace_what, replace_with)
        return text
    #example input: ssdfSERFS - ^#$%43 GSDG  ____ :VKbm sdF öüoäßßEF_____-___ d a s d _e <>DFGDFG????
    #example output: ssdfserfs-43-gsdg-vkbm-sdf-oeueoaessssef-d-a-s-d-e-dfgdfg
    def slugify(string,params = []):
        import re
        #unescape html entity signs (e.g. & -> &) & lowercase string
        import HTMLParser
        string = HTMLParser.HTMLParser().unescape(string).lower()
        translation_dic = {
               'ae' : ['Ä','ä','Ä','ä'],
               'oe' : ['Ö','ö','Ö','ö'],
               'ue' : ['Ü','ü','Ü','ü'],
               'ss' : ['ß','ß'],
        }
        string = replace_all(string,translation_dic)
        string = re.sub(r'[^a-zA-Z0-9\_\-\s]','',string)
        string = re.sub(r'[\s]{2,}',' ',string)
        string = string.replace(' ','-').replace('_','-').strip(' -')
        string = re.sub(r'[\-]{2,}','-',string)
        return string
  • Running Django under a Shared Hosting Environment

    python-django
    I've been developing with Django on my local machine,
    and I was wondering if there was a way for me to
    deploy it on a shared hosting server,
    after playing around with it for a few hours, it actually works!

  • Emmet is an awesome web developer's plugin

    I've recently came across a nice little plugin called Emmet.This plugin is basically an awesome Snippets style plugin,
    that lets you generate some highly customizable HTML templates in seconds.