[note] Web Scraping and Print to PDF

https://medium.com/@e_mad_ehsan/getting-started-with-puppeteer-and-chrome-headless-for-web-scrapping-6bf5979dee3e https://www.chromium.org/developers/creating-and-using-profiles https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF https://www.tecmint.com/install-google-chrome-on-redhat-centos-fedora-linux/ https://bugs.chromium.org/p/chromium/issues/detail?id=603559 https://bugs.chromium.org/p/chromium/issues/detail?id=617931#c1

Continue reading

Node.js Async: How to Use ES6 Promises

Introduction Promises are an alternative to callbacks for delivering the results of an asynchronous computation. They require more effort from implementors of asynchronous functions, but provide several benefits for users of those functions. Promises are a pattern that helps with one particular kind of asynchronous programming: a function (or method) that returns a single result …

Continue reading

[note] Nodejs Blocking vs Non-Blocking

Blocking Blocking is when the execution of additional JavaScript in the Node.js process must wait until a non-JavaScript operation completes. This happens because the event loop is unable to continue running JavaScript while a blocking operation is occurring. In Node.js, JavaScript that exhibits poor performance due to being CPU intensive rather than waiting on a non-JavaScript operation, such …

Continue reading

PHP & Nginx & Apache

Nginx Nginx works differently than Apache, mainly with regard to how it handles threads. Nginx does not create new processes for each web request, instead the administrator configures how many worker processes to create for the main Nginx process. (One rule of thumb is to have one worker process for each CPU.) Each of these …

Continue reading