How to Use Google Fonts in Website design with Bootstrap

If you are using Bootstrap, the default font that comes with the package is pretty simple and is not classy.

Continue Reading →


How to Fetch JSON of all Videos of a Youtube Channel

Youtube APIs are great way to fetch details about video or channels. I’ve written a nodejs module for youtube api, and its documentation is available at: Gyanblog Youtube Nodejs Module.

Continue Reading →


How to Make Sticky Block in Sidebar using Bootstrap

Note: This is based on bootstrap-4

Continue Reading →


Drupal 8: Bootstrap Sticky is not sticky in Drupal 8 - Solved

Bootstrap has a simple solution to have sticky blocks in your html. I’ve given a simple example in my previous post: How to make sidebar as Sticky

Continue Reading →


How to Protect Git branch and Enforce Restrictions

In previous article: Effective Git Branching Strategy, I discussed Git branching strategy and how you can follow best practices to manage your code and builds.

Continue Reading →


An Effective GIT Branching Strategy

Its essential to prepare a git branching strategy. This helps greatly in preparing a build management plan and deployment plans. You can also make a plan to test your new features, bug fixes and deploy it.

Continue Reading →


How to Renew Lets Encrypt SSL Certificate

Introduction to problem

This post is applicable for those who has already an SSL certificate from Lets Encrypt. And, wants to renew them.

Continue Reading →


Python - Dont Use Static or Class variables with Self

While doing code review of one of junior, I encountered following code:

class Test:
  logger = MyLogger.get_instance()
  def __init__(self):
    client = Jira.get_instance()
				
  def do_process(self):
    self.logger.info('Hey test')
				
  # some other code

Continue Reading →


Coding Interview Cheatsheet

Absolute Must Have

Below are must have topics that you must know:

Algorithms Data Structures Concepts
Breadth First Search (BFS) Linked Lists Bit Manipulation
Depth First Search (DFS) Binary Trees Single Design Pattern
Binary Search Tries Factory Design pattern
Merge Sort Stacks Memory (Heap, Stack)
Quick Sort Queues Recursion
Trees Insert, find, delete etc ArrayList, Vectors Complexity, Big-O Notation
Hash Table

Continue Reading →


Resolving Checkmarx issues reported

Unnormalize Input String

It complains that you are using input string argument without normalize.
By normalizing means, do some refinement of the input. The rule says, never trust user input. Always do some check on that, and normalize them.

Continue Reading →


How to enable syslog in Drupal websites (Performance Optimization)

Introduction

Drupal default installation comes with “Database logging” module enabled. Which facilitates you to see the logs on the website itself, with admin role. On the first looks awesome to see the logs in one place, you don’t need to move here and there.

Continue Reading →


How to solve - Apache Ftp Client library is printing password on console

Problem Statement

Apache provides lot of libraries for common utility functions for Java. One such common library is FTP library which provides better functionality to do FTP and FTPS calls. The reference to apache ftp library is: Apache Ftp

Continue Reading →


Static Website Hosting with AWS S3 and Cloudflare

Static websites have several advantages over dyanamic websites. If you are running your personal blog or portfolio or small websites. Static websites is the way to go.

Continue Reading →


Drupal 8: How to Export and Import View

Introduction

It’s always a good practice to have a development environment and production environment for any kind of development. This post is for Drupal 8 development.

Continue Reading →


Curl - Your friend for Rest APIs/Calls - Basic Commands

Curl is a wonderful tool for initiate REST APIs or calls. Or, you can literally open any web URL through it, and save files on public URLs through it. Its pretty light weight.

Continue Reading →


Drupal Code: Fetch Link, Title, Category names, tag names from every article

Problem Statement

You have bunch of articles, say 250 or more. You hired a freelancer to do some SEO stuff. You need to share all the article links, title, tag names etc.

Continue Reading →


Common used Elastic Search queries

Listing down the commonly used Elastic Search queries.

To see all available Index names

GET /_cat/indices?v

Output:

health status index   uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   .kibana HObWTCY_SZOWqShWiQ1vRA   1   1          8            3     55.5kb         27.7kb

Continue Reading →


ElasticSearch: Validation Failed: 1: script or doc is missing

While dealing with ELastic Search documents, you faced this issue while updating document:

ElasticSearch: Validation Failed: 1: script or doc is missing;

Continue Reading →


SEO and Aesthetics - The Web-fonts Balance

Often while designing websites, and writing articles, images not just help in adding to the aesthetics but also cutting through the long slabs of text. More often than not, these images also include text. In fact, sometimes, that when we do not find appropriate images, we simply convert text to images with some cool looking background. There are some websites, for e.g., websites which publish quotations, which would incorporate text in images as this format is more shareable and would get more success via Social Media. Of course, fonts matter too - The same phrase in different fonts will convey different messages.

Continue Reading →


Drupal 7: How to block a user by email programatically

Many times, while administering your drupal website, you must have encountered some spam emails. And, you have no way to contact the users. You might want to block the user.

Continue Reading →