CSS trick for rowspan and nth-child matching

If ever you try to make a table with a single <td> matching more than one line using rowspan, your css that was using nth-child to customize each column is working badly. Only the first line of each rowspan is correctly recognized by the nth-child. All other lines are all shifted by one.

That's because the css engine is not taking in accound the rowspan attribute.

Solution:

In my case it was to add all the <td> hidden by the rowspan like <td style="display:none"> so they are here for the css engine to count properly, but not displayed at all.

grep: exclude grep from ps results

Tip: use a regexp so the grep is not matching the line where is sits in ps list:

ps -aef | grep "[m]atchingexp" will match anything starting with letter 'm' and followed by 'atchingexp' , which will not be in the ps list as it will contain the [] around the first letter of your match

grep: retain colors when piping

By default grep -coloris not producing color symbols if it detects that the output is not a terminal.

grep -color=auto is doing the same, that is not producing color symbols if it detects that the output is not a terminal.

The solution is to use ``grep -color=always`` in the place that need it.

Do not put it in an alias of grep as it would break some code somewhere else. Color symbols are strings like "ESC[35m" and they will be inserted in the text.