Digital Fortress

Compress images with Javascript

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 […]

Read Me Leave comment

Whats a double Arrow function in javascript ?

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 […]

Read Me Leave comment

Rotate Ads in Javascript with Ad-rotator

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 […]

Read Me Leave comment

File Upload with API Platform and Symfony

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 […]

Read Me 1 Comment

How to Encrypt LocalStorage data?

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 […]

Read Me Leave comment

How to link a npm package with its types

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 […]

Read Me Leave comment

Building a REST API with Symfony and API platform

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 […]

Read Me Leave comment

Send email programmatically for free from your domain

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 […]

Read Me Leave comment

Wireless File Transfer between Android and Ubuntu

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 […]

Read Me Leave comment

All in one smart search with typeahead standalone

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 […]

Read Me Leave comment