IT pill

Is there any tool to validate HTML code in Linux?

Yes, certainly. You can download tidy (the HTML syntax checker).

Once downloaded you run it from the command line

$ tidy -e page.html

The above line will just display errors or warnings if any

$ tidy page.html

The above line will display any error or warning and the full HTML page as well

$ tidy -modify page.html

The above line will modify the original input file with a fixed version of it.

For more options, run – of course –$ man tidy.

Daily tip

How to generate a stack trace when an app or program crashes?

For a no threaded application

gdb -q my-program In batch mode gdb -q -batch -ex run -ex backtrace my-program With args gdb -q --args my-program gdb -q -batch -ex run -ex backtrace --args my-program

For a multithreaded app

% gdb -q \ -batch \ -ex 'set print thread-events off' \ -ex 'handle SIGALRM nostop pass' \ -ex 'handle SIGCHLD nostop pass' \ -ex 'run' \ -ex 'thread apply all backtrace' \ --args \ my-program \ arguments-to-my-program