Syntactic Whitespace

Syntax Highlighting in Django

Posted in code, snippets by Mike on the September 11th, 2007

I am currently working on a project with Django A Python web framework ,
It will be a pastebin application , all good pastebins have syntax highlighting … I just wanted to show you how I did it … it can be useful for other projects,

1 def syntax(value,extension):
2     from pygments.lexers import get_lexer_for_filename
3     from pygments import highlight
4     from pygments.formatters import HtmlFormatter
5     "Highlights the syntax of a file based on file extension"
6     lexer = get_lexer_for_filename("file." + extension, stripall=True)
7     formatter = HtmlFormatter(linenos=True)
8     result = highlight(value, lexer, formatter)
9     return result

Sorry for the lack of posts , I will have more snippets up soon

The most brilliant online tool

Posted in Tech, Utilities, post, web by Mike on the January 1st, 2007

Check out what I found on digg today Here
You can make your own “for dummies” book cover …


Google Reader gets a MakeOver

Posted in Tech, Tech news, Utilities, links, rss, web by Mike on the September 29th, 2006

When google annouced that they were going to make a web based rss reader I was really excited….then I saw it …and
I was disapointed :( NOW they have remade it …it is SO much better now …you gotta try it it is so much better (click to enlarge)Google reader

Obligatory technorati tags:

Introducing …Windows Live Writer

Posted in Blogger, Downloads, Tech, Utilities, blogging, interesting, links, rss, web, wordpress by Mike on the August 19th, 2006

I just foind this really cool app called Windows Live Writer  I have to say …for everything microsoft has done…Maybe …Just maybe…they got something right… this thing is nice…It lets you do anything that the web interface does ….Except easier it even does catagories, tags , comments (enable/disable) , trackbacks , pings , timestamps , blockquotes ..everything …And for ONCE …just ONCE they are NOT forcing you to use there service …msn spaces ….Im using it right now for wordpress…and also …it is VERY easy …it took me about 30 seconds to startup (and thats with downloading posts too) All it needed was my blog address and user/pass

Im writing this post with it now …Here are some pictures :

 

 

You can even insert maps from  Windows Live Maps

(pictured –> )

 

 

 

 

 

 

Overall this is a pretty neat piece of software…even if microsoft made it…It is very smooth and integrates well  , even with non-microsoft products (*gasp*) it is even STANDARDS COMPLIANT (*double gasp!!!*)

 

Obligatory technorati tags:

Worlds Smallest and Fastest PDF reader

Posted in Downloads, Tech, Utilities, interesting, links, web by Mike on the August 11th, 2006

And NO its not foxit …although foxit reader is a great reader I have one that goes so fast…you gotta erm…you gotta….WELL ITS FAST OK

Its called gsview and its a gui frontend for ghostscript for windows … it takes about 1 second to open the average pdf

you can get it here