Getting BrowserStack to work with local machine URLs

By default BrowserStack does not have functionality to work with your local machine code. To get this working you have to install BrowserStack local extension.Therefore follow below steps to get it working. Step-by-step guide Make sure you have an account or BrowserStack access. Login to site. When you access, you will see install additional features extension. Click this link which will redirect to BrowserStack local extension. if you missed this, go to chrome extension, search and install the extension....

April 2, 2016 · Sinaru Gunawardena

Jasmine Best Practices

The file name should be Matching for the top level test suite name. There should be one top level test suite per file. Give a meaningful name or title for the test suite. Either use var or this to define variables that needs to use across tests. var variables should be placed just below the top describe (test suite) Use setup and teardown methods to perform common variable initializations and functionalities....

February 29, 2016 · Sinaru Gunawardena

Fix Sublime Text auto-complete hiding issue

Hello Sublime Text lovers out there: you might be using auto-save package [https://packagecontrol.io/packages/auto-save] as a plugin. But there is an irritating bug with it that causes auto-complete popup to hide when auto-save is invoked. While this is not officially fixed in the package, there is a patch (workaround) that will resolve this issue. Please see my comment [https://github.com/jamesfzhang/auto-save/issues/21…] to learn how to apply the work-around in GitHub auto-complete package repository....

February 13, 2016 · Sinaru Gunawardena

How to send an anonymous email

If you wanted to send an anonymous email, this guide is for you. Pre-Requirements Make sure you already have the email prepared. When sending the email, use a public wireless network for better anonymity. Do not use a network if they ask for your information. Do not send this from home. Try to have a machine with a clean OS (no information about you). Here’s the instructions: Download Tor browser and install....

February 1, 2016 · Sinaru Gunawardena

What makes a software product great?

Before talking about software, lets talk about cars. Why do I want to talk about cars is to take great car design as an analogy to great software design. What comes to your head when you hear BMW or Mercedes-Benz? The standard quality of these vehicles. They ordered by most important first are to be; Perform well (functional, does what it is suppose to do well) Reliable Comfortable (ease of use, positive feeling) Artistic / Luxurious (Have a taste) Let’s look at their slogans....

January 19, 2016 · Sinaru Gunawardena

Why your photos not deleted when you delete a user in Laravel

Ok so you have a relationship mentioned in your eloquent user model to link the photo model relationship. So in your user model class you might have something like below to define the relationship. In your Photo class you might have put some code for deleting event to delete the photo files. Ok so now you can define what to do when the user is getting deleted. Here’s the catch....

December 25, 2015 · Sinaru Gunawardena

Sonder WordPress Theme

I wanted to develop a minimalist type of a WordPress theme and use on my personal website. The source code is available under Git if you are interested in using it. View Source

November 19, 2015 · Sinaru Gunawardena

OpenShift with FileZilla

Here’s how you can configure to access your OpenShift using FileZilla FTP. Open FileZilla and go to Edit > Settings > SFTP Click Add key and navigate to .ssh folder. Select id_rsa and when asked, save as id_rsa.ppk Now it should be listed in SFTP block Go to OpenShift and get the SSH URL. In FileZilla add a new connection. For Host use the URL after @ sign of the SSH URL....

October 30, 2015 · Sinaru Gunawardena

Improving PHP Xdebug Speed

Great, you have finally figured out how to install and enable PHP Xdebug. Now you can debug your PHP websites and web apps in your local machine. However what you might found out is that after enabling Xdebug, your website’s response time is very low. You might have to wait for more like a second to display your website. Disabling profiler As I found out, the main reason for this is the Xdebug profiler....

September 25, 2015 · Sinaru Gunawardena

How to setup canonical URL in Yii2

You can place a canonical URL to a page using your view file. To generate the canonical URL, we can use the canonical ( ) in the URL helper class. Also note this method consider if the current website URL is applicable to any URL rules specified and if so generate the canonical URL based on that. One catch I found with this canonical URL method is that all the parameters in the URL are captured and parsed into the generated URL....

September 24, 2015