An approach to use service workers to replace load balancer

In this article, I’m going to discuss a novel way to distribute network load of a highly distributed web based application service. ...

July 15, 2020 · Sinaru Gunawardena

Serving Flask app with Nginx

So you have build a Flask application and now you want to server the application in the web. In this tutorial, I’m going to teach how you can do that with Nginx on an Ubuntu platform. ...

July 10, 2020 · Sinaru Gunawardena

Updating Rails app gems

Past few weeks, we have been focusing on updating Gems of our Rails application. ...

September 4, 2019 · Sinaru Gunawardena

DynamoForms : a library to validate forms only with HTML

This article about my recent work I have done in creating a JavaScript based HTML form validation library. ...

August 8, 2019 · Sinaru Gunawardena

Debugging CkEditor for tests

This week has been an interesting week as it was mostly debugging and fixing tests. ...

November 25, 2018 · Sinaru Gunawardena

Control Philips Hue with Google Assistant SDK on Ubuntu

In this article, I’m going to teach how I manage to integrate Philips Hue bridge with Google Assistant SDK to control my smart lights. ...

September 27, 2018 · Sinaru Gunawardena

Sometimes you have to look back when debugging

Last week has been a firefighting week at work (i.e. debugging and troubleshooting). I’m writing this article to share my experience with debugging a system configuration at work. In the end of article, I have placed some lessons learned points so hopefully someone can learn from it to improve their career. ...

September 15, 2018 · Sinaru Gunawardena

Opening Right-click Menu / Context menu with Selenium WebDriver

Selenium WebDriver providesActionBuilder to perform complex user interactions with a web page. It allows chaining multiple actions together to perform a complex action. You can create a complex action and execute the action (perform) it in the following manner. (Ruby) The action to open the context menu is context_click() . By default, it will click on the middle of the element if you provide one. Otherwise, it will click where the mouse pointer is at....

March 24, 2018 · Sinaru Gunawardena

How to ignore PostgreSQL tables when restoring a database

At my current workplace, we use a copy of the backup database which is created by pg_dump to restore in our development machines. Since the database has a lot of audit tables which adds up a lot of space, I needed an easier way to ignore these tables when restoring the database. Apparently pg_restore can generate a list of tables in the dump file archive. The advantage is that we can use the same list to specify what content we need to restore....

March 6, 2018 · Sinaru Gunawardena

Vagrant – Running Rails server in the background

<p> It is pretty easy. First, let&#8217;s create a function for the script block. Put following code on the top of the Vagrant file. </p> </div> </div> </div> <div id="panel-1302-0-0-1" class="so-panel widget widget_sow-editor" data-index="1" data-style="{&quot;background_display&quot;:&quot;tile&quot;}" > <div class="so-widget-sow-editor so-widget-sow-editor-base"> <div class="siteorigin-widget-tinymce textwidget"> <pre>def start_rails_server <<-SHELL cd /vagrant start rails server as a daemon to kill: sudo kill cat tmp/pids/server.pid rails s -d SHELL end <div id="panel-1302-0-0-2" class="so-panel widget widget_sow-editor" data-index="2" data-style="{&quot;background_display&quot;:&quot;tile&quot;}" > <div class="so-widget-sow-editor so-widget-sow-editor-base"> <div class="siteorigin-widget-tinymce textwidget"> <p> Now in the Vagrantfile configuration block, use the script function and set it to run always....

October 18, 2017 · Sinaru Gunawardena