Compress images with Javascript

These days, most of the photos generated by our devices are quite large in resolution and in size. As developers, we may not need large images (>5mb) especially if you’re using it for a profile picture or so. A common solution so far was to resize the image after it was uploaded to the server. How about doing this at the client side and compressing the image before it reaches …read more

Whats a double Arrow function in javascript ?

Wondering what exactly does a double arrow function do, how it works and when is it used ? We’ll take you through a quick tutorial explaining the same. Before explaining double arrow functions, we’ll take a quick look at arrow functions. Arrow functions Arrow functions are anonymous functions that are special because they do not bind to their own this. They get the value of this from the enclosing context. …read more

Rotate Ads in Javascript with Ad-rotator

For many websites, advertisements could mean a substantial source of revenue. Hence, making it appealing, clickable and unobtrusive is an essential base requirement. Lets see how you could easily setup ad rotation on your website with the use of a standalone javascript library Ad-rotator. Ad Rotation in pure javascript We made a small list of requirements of what we’d expect from an ideal Ad-rotator. These basic requirements were to – …read more

File Upload with API Platform and Symfony

In this guide, we will walk you through the steps of how to handle file uploads with API platform and Symfony. The official documentation on file uploads seems a bit convoluted to me and hence this article hopes to make it easy (in layman’s terms)! To many, handling File upload may seem tricky, but is really not difficult at all. If you are new to the API platform, it is …read more

How to Encrypt LocalStorage data?

Sometimes, you might want to encrypt your data stored in the LocalStorage given that it is easily readable by anyone having sufficient knowledge on where to look. Lets see how we can encrypt localstorage data with ease. Instead of reinventing the wheel, we are going to use a localStorage wrapper that takes care of checking browser support, supports storing more than just strings in the localStorage and most importantly supports …read more

How to link a npm package with its types

You just created a package / library written in TypeScript or Javascript and now you wanna publish it to NPM along with its types (typescript definitions) ensuring that type-hinting is available to everyone who uses your packages, then this little post is for you <3 Linking a NPM package with its types Your package could have been written in typescript or in javascript. Lets deal with packages written in typescript …read more

Building a REST API with Symfony and API platform

One of the basic building blocks of a project is to have a nice resilient API. In this guide, we will show you how you could setup a fully functional REST API with Symfony and API platform which conforms to the Open API specification. As a bonus, you will also get auto-generated documentation via Swagger. Lets jump to see what exactly we need to get started… Rest API with Symfony …read more

Send email programmatically for free from your domain

For a website, sending email is usually one of the primary things needed yet many-a-times is not a trivial task. Lets see how to send email programmatically from your domain with ease and moreover for free! Works with both – shared hosting as well as private hosting (VPS). So what is it that’s needed to send/receive emails from your own domain ? The answer is an SMTP server which is …read more

Wireless File Transfer between Android and Ubuntu

If you’re someone who finds file transfers with the USB cable inconvenient or just old school, then you’re at the right place. We’re gonna show you how you can quickly setup file transfers wirelessly between any android device and Ubuntu (Tested with Ubuntu 16.04, 18.04, 20.04) Should work for future versions too. There are multiple ways to perform wireless transfer and we’re going to look at the easiest ones. 1. …read more

All in one smart search with typeahead standalone

Building a smart search that’s fast, autocompletes your queries and displays suggestions is something that everyone would love on their website. Today you will be introduced to a sleek, lightweight and most importantly, a standalone autocomplete library – typeahead-standalone.js. Why typeahead standalone ? Before answering that, know that typeahead-standalone is heavily inspired from the famous twitter typeahead library. Although it is a fantastic library (we even recommended it back in …read more