Syntax Highlighting in Django
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
Hacking your :CueCat
My name is Dan Keenan, and Mike had invited me to contribute to his blog. This an 11-minute video I put together almost a year ago on how to hack you single-board :CueCat.
Tags:tech technology hacks hacking cuecat video video+tutorials tutorials tech media iptv
wordpress vid tip #1 –installing wordpress locally
How to install wordpress on a local server , if you have any questions please do not hesitate to post them in the comments or email me at leachim6@gmail.com
I appologize for the audio quality It will be much better next time:
[youtube=watch?v=OD4nh5A5up4]
watch online here or download the mp4/h.254 .mov here
shownotes:
– Software used:
–obligatory technorati tags :
blogs blogging video tutorial tutorials Video+tutorial wordpress wordpress.org tech web websites guides