Wednesday, 3 February 2010

Writing a resume using reStructuredText

reStructuredText (rst) is a simple markup language perfect for writing documentation. Altough it may not be as powerful as Latex, it is much simpler to use.

I decided to give a try at using rst to create my resume : here is the input file.

Now, thanks to this rst to pdf converter project (written in my favourite language), I can easily generate a nice pdf version of my resume. Here is the resulting pdf.

This approach has many advantages compared to my previous way of doing (using open office). I can easily update the document, change the style, and generate my resume not only in pdf, but also in html or almost any formats I want.

[edit] : as some people pointed out, the input file for my CV needs an extra file for the style. This file can be found here.

Thursday, 19 November 2009

monitor long compilation time

For people who like me like to keep logs of everything they do, this little script can be used to automatically add entries into a log file before and after running a long command.

It fits nicely into my org-mode system, I put the logs entries into an org file and they then appear into my agenda :

=====================================================================
#
!/bin/bash

# Automatically logs the task given as argument into my org log file.
# This is useful when running long compilations.

LOG_FILE=/home/guillaume/Org/Logs.org
CMD=$@

TMP_FILE=$(tempfile)
LABEL=$(pwd)

echo "* start: ($LABEL) $CMD <$(date +'%F %a %R')>" >> $LOG_FILE

STAT_FORMAT="\
- time :: %E
- retun status :: %x
"


trap ctrl_c INT

function ctrl_c() {
echo "* killed: ($LABEL) $CMD <$(date +'%F %a %R')>" >> $LOG_FILE

exit -1
}

/usr/bin/time -o $TMP_FILE -f "$STAT_FORMAT" $CMD

echo "* end: ($LABEL) $CMD <$(date +'%F %a %R')>" >> $LOG_FILE

cat $TMP_FILE >> $LOG_FILE
rm $TMP_FILE
=========================================================================

Friday, 7 August 2009

Check python coding style on the fly with emacs


A nice emacs trick : using flymake-mode and this python code styles PEP8 checker script written by Johann C. Rocholl, we can have automatic real time checking for standard python coding style.

To make this work I copied the script (pep8.py) in my PATH, and then I added this block of code in my .emac file :

(when (load "flymake" t)
(defun flymake-pylint-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "pep8.py" (list "--repeat" local-file))))

(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pylint-init)))

After this I can just enable flymake mode when I edit a python file, and every coding style error will be highlighted on the fly.

Saturday, 13 June 2009

Fluid dynamics engine

After I read this paper I decided to try to write a small two dimensions fluid dynamics engine for video games. It is quite fun.

Now I need to see what I could use it for.

Sunday, 31 May 2009

Tichy 1.1.0 released

Yesterday I released tichy 1.1.0. In this new release a lot of internal refactoring, improvement of the style system, the text editor, the terminal, and the PIM applications. I also added some unit tests using py.tests.

See the release notes.

Tuesday, 5 May 2009

ditaa

Never used it nor planing to do so soon, but I like the idea a lot : ditaa.

Tichy's new style


Today I created a new style for tichy's widgets.

The way we can create widgets style is very simple : we create 32x32 sized png images for each frame. The image is cut so that each 8x8 sized corner will correspond to the associated widget frame corner, the top will be used to fill the top of the widget frame and so on (see the image.)

This is not very flexible because it only allows 8x8 corners size for all the widgets, but here simplicity beats flexibility.

My previous style was done using the gimp. This time I decided to use inkscape instead. Inskape is one of the best open source software I know. Perfect for this kind of job.

I went for a very bright style, so that we can read the phone screen even outside. I also decided to use no gradient or effect at all, this increases the feeling of simplicity that I want to have in Tichy.