Profile

Achievement

first submission:submitting first snipplet popular snippet:having a snipplet with 20 favorites

magicrebirth's Recent Snippets



« Prev 1 2 3 4
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...
0 3340 posted 13 years ago by magicrebirth
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...
0 2384 posted 13 years ago by magicrebirth
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...
0 1407 posted 14 years ago by magicrebirth
[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...
0 1238 posted 14 years ago by magicrebirth
0 1402 posted 14 years ago by magicrebirth
0 1321 posted 14 years ago by magicrebirth
Not only is it really really fast; it's also order preserving and supports an optional transform function
0 3079 posted 14 years ago by magicrebirth
0 1306 posted 14 years ago by magicrebirth
2 1512 posted 14 years ago by magicrebirth
1 1130 posted 14 years ago by magicrebirth
The resulting tree is represented through a dict where each father gets a key (with all the children as args)
0 1308 posted 14 years ago by magicrebirth
save as a file and run....
0 1905 posted 14 years ago by magicrebirth
0 1342 posted 14 years ago by magicrebirth
« Prev 1 2 3 4