Skip to main content


Showing posts from 2021

Deals You Can't Miss

1 Year Subscription

Search and list files having text with Powershell script

Powershell scripting is pretty powerful tool that is unfortunately under-utilized by many Windows users in their day-to-day work life. This post is focused on one such scenario of searching files based on search text. Case 1: When you want to list files containing text "abc". Case 2: When you want to list files containing any of texts "abc" OR "pqr" OR "xyz". Case 3: When you want to list files containing all of texts "abc" AND "pqr" AND "xyz". Hope it comes handy in your next file hunt..

Fix for issue in deleting messages by Owner in Microsoft Teams

The Issue We recently adopted Microsoft Teams as platform for Team Collaboration. As part of adoption there are various experiments that we do like trying out different third-party apps for productivity. In so doing these apps posts messages that might be noise for others and I wanted to delete these messages post uninstalling these apps. But alas, I couldn't delete the messages even though I'm wear the owner role (the other possible role being member ) of the channel. The Cause Microsoft Teams by default disables this functionality, perhaps to preserve data integrity.  As Administrator of Microsoft Teams however, you can change this default setting The Solution Step 1: Go to Microsoft Teams Admin Center and login as Admin for Teams. Step 2: Go to Messaging Policies , and click Add button to create a new policy (you may call it Power-Owner, if you will) where you can turn on the option - "Owners can delete sent messages". See below snapshot for reference: Step 3: A

Avoid logging "Apache/2.4.48 (Ubuntu) (internal dummy connection)"

Apache 2.x keeps child processes alive by creating internal connections which appear in the log files as “internal dummy connection” on the IP address ::1 or  If you ever monitor Apache log files you’ll see a lot of these in the log files. How to prevent logging for these two IP addresses so your log files won't get filled up with these?  Make the following change to your /etc/apache2/apache2.conf file to add CustomLog directive as below: After this change restart your apache2 server with command in terminal like :  sudo systemctl status apache2

Apache 2 Webserver Throttling with mod_evasive Module

After installing mod_evasive , you can verify whether the mod_evasive module is enabled by running the following command: The default configuration file of mod_evasive is located at /etc/apache2/mods-enabled/evasive.conf , which you will need to configure per your requirements. Below is minimal workable configuration:  DOSHashTableSize: mod_evasive uses this option to control the hash table size. It is recommended to increase this if you have a busy web server. DOSPageCount: This option specifies the threshold limit for the number of requests allowed to the same URI per second. Once the threshold limit has been exceeded, the client’s IP address will be blacklisted. DOSSiteCount: This option specifies the limit on the total number of requests allowed to the same IP address. DOSPageInterval: This option specifies the page count interval. DOSSiteInterval: This option specifies the site count interval. DOSBlockingPeriod: This option defines the amount of time in seconds that a c

Blacklisting IP Addresses in Apache 2 Web Server

Operating System : Ubuntu Web Server : Apache 2.4.48 Objective : Blacklist IP Addresses to block it accessing the web application Steps To Finish Line:   Step 1: Enable rewrite apache module by executing ` a2enmod rewrite ` in your bash terminal. Read a2enmod command as " A pache 2 En able Mod ule". Its complementary command to disable an apache module is a2dismod . Putting it here, just in case you want to rollback your changes for whatever reason it be. Step 2:  Edit the Apache configuration file for the default website by executing ` vi /etc/apache2/sites-enabled/000-default.conf ` in your bash terminal to add the lines below: so that the configuration file looks like below: Step 3:  Now create a file to hold black listed IP Addresses by executing command ` vi /etc/apache2/blacklist ` in your bash terminal and add your IP Addresses to be black listed like below in the file opened for editing in the previous step: Step 4:  You may have to change the blackli

Configuring Google Ops Agent for Monitoring Apache 2 Web Server in Ubuntu VM

Google Cloud released Ops Agent as GA in Jan 2021. The Ops Agent collects logs and metrics on Compute Engine instances, sending your logs to Cloud Logging and your metrics to Cloud Monitoring. I performed the following steps to get this working in the Ubuntu VM in my Google Cloud account. Step 1 :  Install the latest version of the agent per the docs .  Step 2 : Create and edit ` /etc/google-cloud-ops-agent/config.yaml ` which is a user-specified configuration that will over-ride built-in configuration for same keys and merge with built-in configuration for different keys. This config file should have the content below: Step 3 : Restart the agent for the custom configuration to above to take effect. You can restart the agent by executing ` sudo service google-cloud-ops-agent restart ` in your bash terminal. You can list the available versions of the agent with ` sudo apt-cache madison google-cloud-ops-agent `. Step 4 :  To ensure that the agent is ingesting the custom log path,

NOLOCK in SQL Server ain't your friend

If you are in a team that is obsessed with NOLOCK hints to your SQL queries, because you think it is faster and an all weather reliable friend, this post is for you to help you understand why you should avoid it (almost always) for it is not your friend.  NOLOCK in SQL Server is often abused as if it is the magical way to speed up read queries. It is unfortunate that teams forget that "there is NO Free Lunch". Every action is trading off one thing for the other and so when you take an action, be aware of what you are trading to give to get something. The Exceptional Circumstances You Can Use NOLOCK When you are querying live DB for some Reporting, where some bad data doesn't alter the overall aggregate numbers that you compute. When you are using WITH (NOLOCK) for SELECT query in reporting database where data are already written and committed. When you are querying a live production DB to take a peak into it and not use the result as a source of truth, knowing that it mig

Book Review : Hands-on Azure Boards: Configuring and Customizing Process Workflows in Azure DevOps Services

Book Title:  Hands-on Azure Boards: Configuring and Customizing Process Workflows in Azure DevOps Services Author:  Chaminda Chandrasekara Publisher: Apress My Ratings : 4/5 My Review:  First off, this book is not your guide to learn the WHYs in Azure Boards. You are expected to have experience in Agile Project/Program management to know the WHYs on the Agile ceremonies or that you got to grab another book for this. When you have the experience and knowledge on the Agile ceremonies and are looking to adopt Azure Boards for your teams like I had to in my team but don't know where to look at, this book should come to your rescue. It demonstrates it hands-on with screenshots of the GUI and is well organized into relevant topics, that makes you productive with Azure Boards. It served me well and I have recommended it to my team managers and so would to any manager wanting to adopt Azure Board for your project/product management. Go get your copy and get productive :) Note: The same is

Book Review : Elasticsearch 7 Quick Start Guide

The author lived up to the expectations of the book title, especially the book serving as "Quick Start Guide" and I am thankful to it. In days of chaotic full-stack development and technology changes, you need a go to book for quick refresher on topics. This book serves that purpose and in fact has gone beyond in the sense that that author also shares some of the best practices based on his experience which are both valid and unfortunately no practices in many implementations. If your team is using Elasticsearch, I would recommend you have at least a copy of this book as team's go to reference manual. If you have O'Reilly's Safari Online subscription like I do, you can check it out there . Check out my review of this book in GoodReads .

Go - Strengths, Weaknesses and Threats

This post is web-developer's point of view on the strengths, weaknesses and threats of employing Go as a programming language having used (and continuing to use) programming languages like Java, C-Sharp, Ruby, Python, Javascript etc. The Strengths Fairly straightforward and simpler to learn and be productive.  Less features implies less things to worry about -- no OOP and thus no classes, objects, inheritance, polymorphism and associated complexities. Errors as return values instead of thrown exceptions. Now this is a different way to see an error/exception. The world is circling back to Statically typed languages and Go is statically typed.  Programming concurrency is simplified with Goroutines. Arguably consumes lesser resources (Memory, CPU, etc.) than other programming languages.  Has the goodness of JVM/Dotnet world's Garbage Collection freeing the program

My thoughts on hiring and retention

A question to motivate :  Which of the below candidate do you prefer?  A candidate who stayed in a company for good deal of years but has left it leaving a gaping hole in the knowledge.  A candidate who made it a point to share his/her knowledge by way of brilliant documentation making him/her irrelevant to the company before leaving. If your choice is option 1, then I would love to learn your though process around that decision of yours and what is your take on mine that I have put forth in this blog post. If your choice is option 2, I am go glad about your choice and would ask what did you do to ensure that your company as well embraces it in its hiring process. How I approach the hiring side of things?   One of the key things I do working with the Talent Acquisition team is to set the basic value system is set right and that we are all aligned to it, so that we can spot the right candidates that others miss. Having said that, I admit this is not an easy thing to do. One thing that w

10 Benefits of Remote Working

I have good enough experience in both working from office and home. But when everyone works from home as a habit or culture there are some unique benefits to it. This post lists advantages when the office in entirety works from home. Home food over junk food Better work-life balance Lesser office gossip opportunities Lesser scope for office politics Lesser scope for blame game Everyone is forced to communicate better Gaps in current system show up and the team is forced to address it Remote work is pocket friendly Escape from city traffic Ones attitude towards their team, their work and their company stand out distinctly How has it been for you since the start of Covid-19?