Profile

All time reputation: 333

Achievement

first submission:submitting first snipplet

magicrebirth's Recent Snippets



« Prev 1 2 3 4
  1. FAV

    Clean up expired django.contrib.session\'s in a huge MySQL InnoDB table

    While django provides the django_admin.py cleanup script, if sessions get out of control sometimes you have to go lower level to get everything cleaned up. If the problem gets out of hand and you hit the resource limits of the machine, it is very dif...
    Django 4 views posted 8 years ago magicrebirth
  2. FAV

    Adding request object info to a template

    Django 4 views posted 8 years ago magicrebirth
  3. FAV

    How to make git use TextMate as the default commit editor « Developmentality

    Now when you do a git commit without specifying a commit message, TextMate will pop-up and allow you to enter a commit message in it. When you save the file and close the window, the commit will go through as normal. (If you have another text editor...
    Bash 1 views posted 8 years ago magicrebirth
  4. FAV

    Django: check whether an object already exists before adding

    Django 2 views posted 8 years ago magicrebirth
  5. FAV

    Convert the time.struct_time object into a datetime.datetime object:

    Django 2 views posted 8 years ago magicrebirth
  6. FAV

    Colorizing Python Source Using the Built-in Tokenizer

    You need to convert Python source code into HTML markup, rendering comments, keywords, operators, and numeric and string literals in different colors. tokenize.generate_tokens does most of the work. We just need to loop over all tokens it finds, to...
    Python 2 views posted 8 years ago magicrebirth
  7. FAV

    RGB Gradation Chart Generator

    [from the author's website] I wrote this to better understand the relationship between RGB colors. Running it will generate a fairly large HTML file with all sorts of color transitions on it so you can see what is happening as colors are tweaked in...
    Python 3 views posted 8 years ago magicrebirth
  8. FAV

    RGB Color Gradation Function

    Python 2 views posted 8 years ago magicrebirth
  9. FAV

    Shell : How to rename/mv large number of files

    Bash saved by 4 people 4 views posted 8 years ago magicrebirth
  10. FAV

    Counting elements in a list

    Python 2 views posted 8 years ago magicrebirth
  11. FAV

    Extracting a URL in Python

    Python 5 views posted 8 years ago magicrebirth
  12. FAV

    Adding custom django package to WSGI settings

    Django 1 views posted 8 years ago magicrebirth
  13. FAV

    Ways to Move up and Down the dir structure in Python

    Python 2 views posted 8 years ago magicrebirth
  14. FAV

    Remove duplicates from a list

    Not only is it really really fast; it's also order preserving and supports an optional transform function
    Django 1 views posted 8 years ago magicrebirth
  15. FAV

    Python: rename a file

    Python 2 views posted 8 years ago magicrebirth
  16. FAV

    Getting the difference between two lists - Python

    Python 3 views posted 8 years ago magicrebirth
  17. FAV

    request: get multiple values | Django

    Django 3 views posted 8 years ago magicrebirth
  18. FAV

    CSV reading in python

    Python saved by 8 people 8 views posted 8 years ago magicrebirth
  19. FAV

    Strip/Remove HTML tags (django utils)

    Django 4 views posted 8 years ago magicrebirth
  20. FAV

    recursion in scheme and python

    Python 3 views posted 8 years ago magicrebirth
  21. FAV

    Best way to choose a random file from a directory

    Python 3 views posted 9 years ago magicrebirth
  22. FAV

    Python generator

    Python saved by 1 person 4 views posted 9 years ago magicrebirth
  23. FAV

    Running scripts ciclically

    JavaScript 2 views posted 9 years ago magicrebirth
  24. FAV

    From a list containing tree info, generare a tree in dict format

    The resulting tree is represented through a dict where each father gets a key (with all the children as args)
    Python 1 views posted 9 years ago magicrebirth
  25. FAV

    Creating directories programmatically

    save as a file and run....
    Python 1 views posted 9 years ago magicrebirth
  26. FAV

    Verify if an html element is empty

    JavaScript 2 views posted 9 years ago magicrebirth
  27. FAV

    Reload an image with jQuery

    JavaScript saved by 9 people 3 views posted 9 years ago magicrebirth
  28. FAV

    Forcee a page to reload

    JavaScript 1 views posted 9 years ago magicrebirth
  29. FAV

    How to Add Locations to Python Path in Django

    Python 1 views posted 9 years ago magicrebirth
  30. FAV

    Django simple url redirect

    Django 6 views posted 9 years ago magicrebirth
« Prev 1 2 3 4