Category Archives: Web Development

From XHTML to CSS to PHP and everything from web security and usability etc.

Finally found a task scheduler/cron for Rails

I have been working with a cron-like task scheduler in the past and among the very few options, we choose crono. It works because it allows us to run tasks at 10-second interval and as well as the regular daily/hourly/weekly … Continue reading

Posted in Cron, Rails, Ruby, Web Development | Tagged , , , | Leave a comment

Docker Compose down does not remove volumes

I was trying to fix a deployment issue on one of my Docker setup where source code is being pulled periodically from master branch inside a volume, however, I ended up having the same outdated branch over and over again. … Continue reading

Posted in Web Development | Tagged , | Leave a comment

Angular 6.x – 404 page with correct header using Angular Universal

Based on my previous post about adding a 404 page in Angular 4.x, I have added a tweak to return the correct 404 status code header. This process, however, requires the Angular Universal integration. This post assumes that you already … Continue reading

Posted in Angular, Web Development | Tagged , , | 1 Comment

Angular 6 – Add scroll to top when route changes

Since Angular apps are SPAs, the page does not reload when navigating through the application/website. If you happen to scroll to the bottom of the page and clicked a link, the next page will show the content near the bottom … Continue reading

Posted in Angular, Web Development | Tagged , | Leave a comment

Setting Title Tag for Angular Applications

Due to the nature of Angular apps being SPAs (single page application), historically, changing title tag or meta tags are not supported by default. However, due to SEO reasons, these features were added and works best when used in Angular … Continue reading

Posted in Angular, SEO, Web Development | Tagged | Leave a comment

Sweet Alert – Using Textarea as Content

We used Sweet Alert JavaScript plugin as a beautiful replacement for JavaScript alert and confirmation popups. It supports showing input box too which is good when asking for feedback from users. In our case, we needed a textarea instead and … Continue reading

Posted in JavaScript, Web Development | Tagged , | Leave a comment

Angular 6 – Configure Angular Universal with pm2

Angular Universal allows Angular apps to be run in both the server and in the browser. Before, I used the plain Express server to serve the static Angular application and I used the pm2 tool to manage the server process. … Continue reading

Posted in Angular, NodeJS, Web Development | Tagged , , | Leave a comment

jQuery Steps plugin broken on Safari 11 when content has the $ character

We are using an old plugin called jQuery Steps in one of our important page. We received reports that the page is not working on a Mac High Sierra using Safari 11. I fired a BrowserStack test and found out … Continue reading

Posted in Web Development | Tagged , | Leave a comment

RubyMine 2018 theme is too flat, how to bring back the old theme?

So if you just installed the latest RubyMine for 2018 and installed the Material UI plugin, the whole RubyMine interface will use the Material design for the UI which means, everything is flat. If you don’t like it and prefer … Continue reading

Posted in Personal Blog, Web Development | Tagged | Leave a comment

Inserting page breaks for printing or PDF via HTML

So we have a web invoice which is also converted into PDF. When line items section becomes too tall (so many items), the generated PDF from HTML (via wkhtmltopdf) breaks some of the lines in the summary section and is … Continue reading

Posted in CSS, Web Development | Tagged , , | Leave a comment