When working with databases, you will often come across situations to preserve the ACID principles and keep your db documents in a consistent state and avoid race conditions when two clients are updating the same entity at once.

Firebase Cloud Firestore is a NoSQL document database and it’s a great way to get your app up and running in a quick matter of time and completely serverless. It’s fast and also free for a limited amount of reads and writes per day.

Here is my use case

  • Employees who eat at a company restaurant are provided with a mobile app…

Sometimes you might need to apply changes that you have done on one branch and copy them to another. This can be simply done by merging that branch to the current branch that you need the changes applied to. But what if you want to select and apply certain commits only?

Git provides you a method called cherry-pick where you can select certain commits from one branch and apply it to another. You can copy a single commit or a range of commits with cherry pick. Let’s look at a simple example.


I have a repository with several branches and…

This article will help you to integrate a custom SMS gateway on order checkout in Wordpress WooCommerce

There are many cases when you’ll need to send an SMS to your customers to notify their bill or a promotion. In such cases, you will need to call your SMS gateway service with the text you want to send through a GET/POST request.

Some SMS gateway providers may already have their own php SDK that you could use as a plugin in Wordpress which can send SMSs based on WooCommerce events. But some SMS gateway providers will not have a Wordpress plugin…

Photo by Jordan Whitfield on Unsplash

The piano might be the easiest to start but hardest instrument to master. If you have a busy lifestyle like me, but love to play the piano, you’ll find these tips helpful to improve your piano skills in the small time you have. These are the top tricks that helped me and I hope they’ll help you too.

1. Pick a good time — same time every day

Pick a comfortable time each day, a time with least disturbances. Our brain seems to catch things quickly if it’s done on the same time everyday. It doesn’t matter if you have 5mins to spare or an hour, it’s always good to…

Leopard mother and her cub

Located in the beautiful southeast corner of the island, Yala is the second largest National Parks in Sri Lanka, with home to hundreds of endemic and foreign species of fauna and flora. It’s famous for its leopards and so many other species.

If you are a wildlife lover and traveling to Sri Lanka, then visiting Yala is a must.

Getting there

Easiest way to reach Yala is through the Southern Highway and travel till the last exit, Mattala. Yala has two main entrances, Palatupana and Katagamuwa.

I've been a regular visitor to wildlife Parks in Sri Lanka since I was 3 years old and this is about stories I’ve heard and experiences I’ve had on the devil bird.

A popular folklore that is talked about in Sri Lanka and India, is about a mysterious creature in the jungle, that makes a bone chilling scream at night, which resembles a soul screaming in agony. People believe that the call of this creature is a sign of bad luck and will surely bring chaos to someone in the village, that would end in death. Because of these reasons, this creature is called by many names.

  • යක් කුරුල්ලා — yak kurulla (devil bird)
  • උලමා — Ulama (screamer)
  • Banshee (Irish folklore, mixed later into India)
  • Churail, Chudail, Churel (A ghost of a…

What’s this about. This article is about using Echo’s default JWTWithConfig middleware. We wrap it around a middleware of our own to continue, even if the token is invalid. This is useful for routes that returns different data when a user is logged in or not.

A background

The Labstack Echo framework for Go lang provides a powerful set of tools to build complete and an elegant web components and services. It has a lot of APIs to handle HTTP requests with validations and middleware. Middleware handlers act as a layer of authorization and validation for protected routes. For an example, if…

TensorFlow is a great tool when it comes to efficiently training your machine learning algorithms. It is optimized to run on top of different types of hardware and to it makes maximum use of your memory, CPUs and GPUs if available. TensorFlow’s initially was built to run deep learning algorithms on top of special hardware so that the learning can be done fast. After Google open sourced TensorFlow, it became popular among the community which made it’s evolution and became the platform that it is today.

This article will cover how you can use TensorFlow to implement, train and test…

Raveen Harith Perera

A Software Engineer by profession. A WildLife enthusiast. Loves the piano

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store