Showing posts with label Code. Show all posts
Showing posts with label Code. Show all posts

Friday, March 23, 2007

Making your Code pretty on a browser


google-code-prettify is a Javascript module that makes your code look Pretty on a browser.

You include a CSS file and a prettify.js script and there you have syntactically highlighted code.

It works for a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk and a decent subset of Perl, but, because of commenting conventions, doesn't work on Smalltalk, Lisp-like, or CAML-like languages.

Get it here

Saturday, October 14, 2006

Ugly formatted perl code ? Try perltidy

Perl: perltidy is an excellent perl code formatter. It's freely available from SourceForge and provides an extensive range of user-configurable options for indenting, block delimiter positioning, column-like alignment, and comment positioning.

Get perltidy

Friday, October 13, 2006

Code Style - Common file properties

With the exception of special-purpose files, each source file must ontain the GNU copying statement, CVS Id tag, and author's name and e-mail address.

C, Perl, and Bourne shell files must contain Gnu Emacs variables at the end of the file:

# Local Variables:
# mode: perl
# indent-tabs-mode: nil
# perl-indent-level: 4
# End:

Each file must always end with the linebreak. Otherwise it might conflict with CVS. All files must have Unix linebreak format.

Source - Torrus.org