August 2011
1 post
3 tags
Multi site system on single django project with...
Yesterday I’ve set up an interesting uwsgi installation, which can serve multiple sites from single django project. Here is uWSGI Upstart script for ubuntu server: description "uWSGI starter" start on (local-filesystems and runlevel [2345]) stop on runlevel [016] respawn exec /usr/local/bin/uwsgi --uid penpen \ -s 127.0.0.1:9010 -M -p 2 --reload-os-env \ --logto...
Aug 7th
4 notes
June 2011
2 posts
IPv6 Sage Certified
Jun 23rd
Publishedin
One of my friends told me about good service for bloggers. Here is - http://publishedin.com/
Jun 15th
March 2011
1 post
Leaf
I’ve just released leaf 0.4. This is simple python library for html parsing. GitHub Python packages
Mar 8th
February 2011
1 post
3 tags
Ugly unicode text
A couple of days ago, I worked with an ugly unicode text, kind of like this: ⒶⓀⓋⓉⒺ b̼̘̬ͭ͂̈́̀l͇͉̱͚̲̗̗͞a̱̭̬͎͉̤ͨ͂̌̑̓͂͐h̬̯̻̩͗ͩͯḅ̢̬͕͈̥̅̌͆̔̉ͅḽ̘̖̼͚́͒̈́̏͌̃͟ ͎̮̫̍ͫ̽͐͋ͤ͂a̜͔̩͇̩̪͐̍̐̃ͤ͑ ̦̌ḧ̙̝͓̜͕̝̈́ͅb̛̞͔̽̃̍ͪla̘̠͖͍̣͙̝͌ͪ͒̃ͯ ͗͛̆͊.̛̭̜̞̲͓̯ͧ̅ĥ͂͑/̢̊/̠̘͖͖̖̺̯ And I need to get a normal text from this shit, because MySQL has weird unicode support. So I made these simple functions for cleaning up unicode text: def...
Feb 13th
15 notes
January 2011
2 posts
2 tags
Timestamps in Python
Sometimes you need to use unix timestamp in Python for data exchange with external application (e.g. PunBB stores date as timestamp). Unfortunately Python doesn’t have a built-in function for that.  Here are some functions for that from my utils.py. Convert datetime.datetime object to unix timestamp: def timestamp(datetime_obj): """ Convert datetime object to timestamp """ if...
Jan 14th
1 note
First post
Hello there :3
Jan 13th