Skip to main content

Posts

Call a custom Script from Excel

  It is quite common that we receive the data in Excel and several times we have to remove unwanted characters from columns or modify the data as per the requirement. To avoid manual fixes of these kind of requirements, we may use Macro to automate the process which not only increase productivity but also avoid manual errors. We can easily create Macro to quickly fix it. Here are the steps to create Macro and run it. Open Excel Goto View tab on Main menu Click on 'View Macros'. This should open a Macro popup. Enter Macro Name and click on + icon. Clicking on + icon should open Macro Coding screen(as shown below). Add your code in the function. Click on Save icon to save the file with Macro. Click on Run icon to run the Macro code. The above code should remove additional line breaks from columns. Reference Code(to remove line breaks from columns): Sub MyCustomMacro () Dim MyRange As Range Application . ScreenUpdating = False Application . Calculation = xlCa
Recent posts

Power of Sitecore Powershell Extensions()

What is Sitecore Powershell Extensions(SPE)? It is Sitecore accelerator which can drastically increase the speed to develop a Sitecore solution and helps you write script in powerful way.  It provides a command line and scripting environment for automating Sitecore tasks.   Is it Licensed tool OR free to download? If you have Sitecore license, these extensions are free of cost.   How to install it? Installation   For non-containerised environment click here For containerised environment   click here You may download it from Sitecore downloads as well. Sitecore Powershell Extension Interface Why you need it? Rather writing everything in .Net code, Sitecore has provided provision to write powershell script which can work same way(as like C# code) and help building reports and automating tasks within Content Editor.  Example of Powershell script Parent Script: Try { $currentItem = Get-Item . Import-Function Show-Page-Dialog $resultItem = Show-Page-

Bye Bye Docker Desktop, Welcome Docker CLI

We are using docker desktop which has been licensed and this is really annoying for all developers. Good news is that, there is way to get rid of docker desktop and continue doing our great engineering work with docker CLI. Here is the step by step guide to install Docker CLI on MAC - Uninstall Docker Desktop > brew uninstall docker Also check Docker Desktop is removed from MAC as well. If not, delete the Docker desktop app from Applications folder.   Install Hyperkit > brew install hyperkit If you are receiving any issue while installing hyperkit like below, it is because, sometime deletion of docker gives error, if it is not able to find the required folder.  >  Error: Permission denied @ apply2files - /usr/local/lib/docker/cli-plugins Lets fix this issue by creating the folder once and running cleanup command -  >  mkdir -p /Applications/Docker.app/Contents/Resources/cli-plugins > brew cleanup Try installing hyperkit again, > brew install hyperkit It should be ins

Nutch crawler and integration with Solr

Before moving ahead with this article, I assume you have Solr installed and running. If you would like to install Solr on windows, mac or via docker, please read Setup a Solr instance . There are several ways to install nutch which you can read from Nutch tutorial , however I have written this article for those who would like to install nutch using docker. I tried finding help on google but could not find any help for nutch installation using docker and spent good amount of time fixing issues specific to it. Therefore I have written this article to help and save time of other developers. Install nutch using docker- 1. Pull docker image of nutch using below command,      > docker pull apache/nutch 2. Once image is pulled, run the container,      > docker run -t -i -d --name nutchcontainer apache/nutch /bin/bash 3. You should be able to enter in the container and see bash prompt,      > bash-5.1#  Let's setup few important settings now- 1. Goto bin folder,       > bash-5.

Identify security leaks in code

  We will be using Gitleaks software to find security leaks. Here are the steps to identify leaks in your code repo - Install gitleaks on your local machine. Click here to install . Check if it is installed successfully on your local machine.  Website> gitleaks --version If its installed, it should show version of gitleaks. Download sample.config file( see attachment ) and copy on your local machine( this is the sample file with configuration/rules, you may change it as per your requirements ). Now git clone the repo on your local machine and goto your code folder. Once you are in code folder, run gitleaks command. Website> gitleaks --path=./ --config-path=../sample.config --verbose where, --path=./ => path of .git folder --config-path=../sample.config => path of sample.config file You can also download the report of leaks for sharing it with your team - Website> gitleaks -v --pretty --path [RepoPath] --config-path=../sample.config --report= [PathtosaveReport] wher

Interview Questions for experienced professionals: Part 1

This article is for those who are prepaing for any technical job interview. Different organisation have different interview process and here I am sharing the interview of one of the consulting firms. Interview was categorised into multiple sections to understand T shaped skills. T shaped skills accesses a candidate on core expertise(depth of understanding) and other technical skills(breadth of concepts).  I have catagorised the interview into sections which includes, Algorithms, SQL Server, Innovative Ideas, Technical Knowledge and so on. You may check your knowledge as well. Try it once. Algorithms Q: How to swap the values of two integers with using additional memory?  Ans:  public static void SwapInt () { int a = 25 ; int b = 35 ; a = a + b ; b = a - b ; a = a - b ; Console . WriteLine ( "a=> " + a + " b=> " + b ); } Q: How to find duplicate i

Dockerize a dotnet core application with SQL connectivity

Before reading this article, I am assuming that you know Docker, Dotnet core and have a dotnet core application which is trying to connect to SQL server. Read how to build aspnet core app, docker and run the docker container. If docker container is running and you are not able to connect to database, this blog should help you fix it.  Prerequisite -  Make sure code is working via running aspnet core locally via visual studio or command line. Port 1433 is opened for connecting to SQL server. Solution If you have Docker file ready, it should somewhat look like below file -  FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env WORKDIR /app # Copy csproj and restore as distinct layers COPY /SampleAPI/*.csproj ./ RUN dotnet restore # Copy everything else and build COPY . . WORKDIR /app/SampleAPI RUN dotnet publish -c Production -o publish # Build runtime image FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 WORKDIR /app/SampleAPI COPY --from=build-env /app/SampleAPI . WORK