Thursday 3 September 2020

PHP Regex function to extract text between tags for a synopsis or intro text

The following method prepare the synopsis from the body and the second part is for unit tests:

Hope it helps!

Saturday 11 April 2020

Fix for ng serve --watch is not watching for code changes in Ubuntu

I was running the Angular 8 application on Ubuntu LTS 18.04 on my machine and was having an issue to refresh on code update using  --watch.

Trying to use ng serve and ng build --watch was not watching for code changes and I thought it was something to do with node or angular-cli.
However, I found the solution on Github (https://github.com/angular/angular-cli/issues/8313)
I ran the following on Terminal and apparently, it worked and watching code changes:
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system

Hope this helps!