Jumlins TechBlog

The coding hell and the daily IT of Niklas Jumlin

July 14th, 2009

So i was asked to tell how many lines of code a project was at so far..

After some brain bashing i came up with the following, there is proberbly better ways to do it.. but it seems to work pretty nice.

grep -R --include=*.php --include=*.js --include=*.css --include=*.htm* . * | wc -l

This counts the lines in all the text types i had used in that project.

July 5th, 2009

So after struggling with absolute positioning, i finally came across the following.

* { padding:0; margin:0; }

Above removes the differences, apparently caused by different theories on when there is a margin or not…