Thursday, October 15, 2015

Easy formatting of source code in blogger: inlined and blocks

Add wiki-like code blocks and inlined code snippets in your blogger posts

Posting pieces of code to blogger is annoying. Reverting to HTML editor mode to insert special tags is not fun at all, and prone to inconsistency. I tried using external code-formatting libraries, such as the very nice SyntaxHighlighter, but it is very heavy and makes your site slow to load imho.

So here is a short hack to handle simple pieces of codes. Moreover it handles angled brackets completely transparently (resp. the < and > symbols), that often pollutes copy/pasted codes.

It only requires twenty lines of javascript and CSS to be copy/pasted in your blog.

SSH tunneling: handling your mom's linux box, remotely and anywhere.

I want to be able to log on the linux box of my mom, wherever she is.

This helps both me and her, so I can administrate, debug or backup her computer without having to tell her bad words. Here is what I did, thanks to an automatic SSH tunneling from her to me.

The fact that she is here and there all the times makes it impractical to configure the different internet boxes, routers and NATs. I want to be able to reach here even when she is in a cyber-café (not her kind, but this is out of topic).

Thursday, October 8, 2015

Linux log files: discard verbose useless lines

Your linux log files are "spammed" by verbose programs or activities that you would like to silence? Here is a short how to to filter some specific lines.