The best programming blog.

Covering a wide array of programming topics.

Add new user as admin to AWS console

The administrator in the AWS console has full access to all AWS services and resources in the account. This means that he or she can create, modify and delete resources; manage permissions for other users; and view details about all the AWS services that are running in the account. Administrators can perform a variety of…More

Create access key and secret key for existing IAM user

Go to IAM dashboard. Select Users menu from the left hand side menu. Select the user you want to create the access key for. Click the Security credentials tab. In Access keys section, click the Create access key button to create a new access key for the user. In the modal click the Show link…More

Scroll to div in Angular

Below is the code to scroll to a specific div with Angular. It contains both the html and the typescript code to do the same. HTML: <button (click)=”ClickMeToScroll()”>Click me to scroll</button> …. …. …. …. …. <div id=”TargetDiv” class=”row g-0″> <div class=”col-12 col-md-4″> <h4>Target Div</h4> </div> <div class=”col-12 col-md-8″></div> </div> CodeBehind (.ts): import { ViewportScroller…More

Using NG Bootstrap modal in Angular project

Steps to make use of NG Bootstrap modal in Angular way: Button to open the modal: <a class=”my-notifications” (click)=”openNotificationModal(notificationModal)”> Open the modal </a> Modal HTML: <ng-template #notificationModal let-modal> …. …. …. <div class=”modal-header”> … </div> <div class=”modal-body”> … </div> </ng-template> CodeBehind (.ts) import { ModalDismissReasons, NgbModal } from ‘@ng-bootstrap/ng-bootstrap’; …. …. constructor( …….. private modalService:…More

How to update WordPress site

Go to admin dashboard /wp-admin/index.php. In the header you will see a refresh icon next to site name. You will be redirected to WordPress Updates page /wp-admin/update-core.php. You will see an Update button. Click the button to update the site. After some interval your site will be updated to the latest WordPress software.More

Sign in with Microsoft account in VSCode

Click Settings icon from VSCode tool bar. Click Sign in to Sync Settings. Click Sign in with Microsoft in the header bar of VSCode. Next screen will prompt you to enter your Microsoft account credentials. Submitting the credentials with present the following message: You are signed in now and can close this page. Close the…More

Add password to elasticsearch

Let’s say the elasticsearch is installed at following path elasticsearch C:\elasticsearch-7.17.0\config. Navigate to the elasticsearch.yml config file and set xpack.security.enabled to true. Navigate to bin folder of elasticsearch installation and run the following command in the terminal bin/elasticsearch-setup-passwords interactive Follow the steps mentioned in the prompt. Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.<br>You…More

Open a folder in Visual Studio Code in MAC

Install ‘code’ command in PATH Install the macOS service Right click any folder, go to Services and there you will see “Open in Visual Studio Code” option now. Clicking that option will open that folder in Visual Studio Code.More

Add a favicon to your WordPress site

Having a favicon for your WordPress site is a great way to enhance its branding and make it stand out in users’ browser tabs. A favicon is a small icon that appears next to the website’s title in the browser’s tab. It helps users easily identify and recognize your site among multiple open tabs. Adding…More