Skip to content

Instantly share code, notes, and snippets.

View codingforpleasure's full-sized avatar

codingforpleasure codingforpleasure

View GitHub Profile
@codingforpleasure
codingforpleasure / gil_BASH_CPP_DIFF
Created May 11, 2012 10:53
Syntax highlighting BASH, CPP, C, DIFF for my blog...
/*
Dual licensed under the MIT and GPL licenses.
Dual licensed under the MIT and GPL licenses.
Dual licensed under the MIT and GPL licenses.
*/
(function(){function a(){this.regexList=[{regex:/^#!.*$/gm,css:"preprocessor bold"},{regex:/\/[\w-\/]+/gm,css:"plain"},{regex:SyntaxHighlighter.regexLib.singleLinePerlComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:RegExp(this.getKeywords("if fi then elif else for do done until while break continue case function return in eq ne ge le"),"gm"),css:"keyword"},{regex:RegExp(this.getKeywords("alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chrootcksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format free fsck ftp