Author: Hiral Patel

How to Protect Copyright of Webpage Content

Web is a public place and stealing images/videos/text from your website is one of the common issues. There are precautions available to avoid this issue to some extent, but it is not possible to avoid it completely. In this post, I have discussed some tricks to show how to avoid this issue. Disable Rightclick on a Webpage jQuery is one of the widely used library. You can use following code to avoid right click on a website. Avoiding a rightclick will prevent user from opening Developers Tools in a browser. Remember, user can still open developers tools from browser’s...

Read More

The Most Frequently Used Git Commands

This tutorial compiles list of frequent Git commands for reference purposes. Content Git Connecting to Repo Branch Operations Git add, commit Command Git fetch, merge, and pull Git Reset Git Clean Git Logging Git Connecting to Repo Connect Your Local Repo to Server Following command will connect your local git repo to server. Read More git remote add origin [server] Branch Operations Create a new branch Following command will create a new branch with [branch-name]. Read More git branch [branch-name] Switch to another branch Following command will to a branch with [branch-name]. Read More git checkout [branch-name] Create a...

Read More

IIFE – Immediately-Invoked Function Expression in Javascript (Simplified)

Functions are a core component of Javascript language. We do a lot of function declaration in our daily programming life. After reading this article, you might use a power of IIFE to encapsulate your business logic and expose minimum methods to a global scope. IIFE is acronym for “Immediately Invoked Function Expression”. It is pronounced as “iify”. The Very simple syntax of IIFE is as below. (function() { /* Code here */ })(); Content Function Declaration vs Function Expression Immediately Invoked Function Expression – IIFE Usage : Encapsulation in JS using IIFE Function Declaration vs Function Expression In javascript,...

Read More

Backup Web Server Files Quickly using gZIP

Have u ever waited for hours to transfer a batch of files from a server to a local machine? I know it is annoying. FTP solutions like FileZilla and WinSCP are very useful for transferring few files between remote machine and local machine. But, it takes too much time to transfer a large number of files. This post shows how you can transfer a large number of files from a server to a local machine quickly by zipping files. Content Method 1: Transfer files using FileZilla Method 2: Quickly Transfer files using Terminal by gZipping Method 1: Transfer Files...

Read More

6 Ways to Iterate over Object in Javascript

There are many ways to iterate an object in javascript. This post shows few most popular way of iterating an object in javascript. Initialize Consider following is the object we are going to work with in our example. Objects in javascript does not maintain the insertion order. Insertion order is not maintained while iteration for Objects. var person = {}; person.firstName = "John"; person["lastName"] = "Taylor"; person.country = "Canada"; Method 1 : Using for…in statement for...in iterates over enumerable property of an object. It is a good idea to check whether enumerable property belongs to object’s own property or...

Read More