I think a blog is not the right kind of information architecture for your purpose: it focuses on the publication date and orders content reverse chronologically (not useful for you), typically comes with features you don’t need (like a comment function), and for organizing your content, you only have tags and sometimes categories.
A wiki should be more suitable: you can organize your content in any way that suits your needs, and creating/editing/linking your content is usually more convenient than in other CMS like blogs.
I’m using WikkaWiki for a similar purpose (and can recommend it as personal wiki).
DokuWiki is another good solution, with the benefit that it doesn’t need a database: all pages are saved in text files.
Both come with syntax highlighting (using GeSHi) by default:
In WikkaWiki, the syntax for code blocks is %% … %%
, and for enabling syntax highlighting, it’s %%(javascript) … %%
.
In DokuWiki, you can indent code blocks with two spaces (or use <code>…</code>
or <file>…</file>
). For syntax highlighting, you have to use <code javascript>…</code>
or <file javascript>…</file>
.
Both also come with a search function, but if you organize your content by adding links to all relevant pages, you’ll probably rarely have to use it. When using my personal wiki, I can visit most of my 2000+ pages by directly entering the URL, or by entering the URL of a "parent" page (e.g., all JavaScript snippets are automatically listed on the JavaScript page’s backlinks, because I add a link from every JS snippet to this page).