• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Archives for December 2021

How to Delete unnecessary Entry in /etc/shadow

by admin

Question: How to remove all the unnecessary user entries in /etc/shadow file. 1. Create a backup copy of /etc/shadow file. # cp -p /etc/shadow /etc/shadow.backup 2. Ensure the user is not existing anymore in /etc/password file. # cat /etc/passwd | grep [userid] 3. Edit the /etc/shadow file, look for the line and remove the unnecessary […]

Filed Under: Linux

Kubernetes Command Line Reference (Cheatsheet)

by admin

Creating Objects Create resource: $ kubectl apply -f ./<file_name>.yaml Create from multiple files: $ kubectl apply -f ./<file_name_1>.yaml -f ./<file_name_2>.yaml Create all files in directory: $ kubectl apply -f ./<directory_name> Create from url: $ kubectl apply -f https://<url> Create pod: $ kubectl run <pod_name> –image <image_name> Create pod, then expose it as service: $ kubectl […]

Filed Under: DevOps, Kubernetes

How to write Bubble sort in Bash

by admin

Bubble sort is a simple algorithm that basically bubbles up the elements of the array. This means that it traverses the array multiple times and swaps the adjacent elements if they are in the wrong order, as in the following diagram: Bubble sort Bash Script Here is a simple bash script for bubble sort algorithm. […]

Filed Under: DevOps, Shell Scripting

Strings and Variables in Python

by admin

Strings A string is simply a series of characters. Anything inside quotes is considered a string in Python,and you can use single or double quotes around your strings like this: This is a string.” ‘This is also a string.’ Changing Case in a String with Methods One of the simplest tasks you can do with […]

Filed Under: DevOps, Python

How to sort ListBox items programmatically in asp.net

by admin

The ListBox server control is very similar to the DropDownList, but differs in its display. You can have more than one item at a time shown to the user. The ListBox also enables users to select more than one item at time. For example, if you have a site that delivers news to its users […]

Filed Under: asp.net

ASP.NET Image Control Example

by admin

The Image control supports the following properties (this is not a complete list): AlternateText — Enables you to provide alternate text for the image (required for accessibility). DescriptionUrl — Enables you to provide a link to a page that contains a detailed description of the image (required to make a complex image accessible). GenerateEmptyAlternateText — […]

Filed Under: asp.net

How to use NumericUpDownExtender in asp.net ajax

by admin

NumericUpDownExtender in asp.net ajax The NumericUpDownExtender control allows you to put some up/down indicators next to a TextBox control that enable the end-user to control a selection more easily. A simple example of this is illustrated: <%@ Page Language=”C#” %> <%@ Register Assembly=”AjaxControlToolkit” Namespace=”AjaxControlToolkit” TagPrefix=”cc1″ %> <html xmlns=”http://www.w3.org/1999/xhtml”> <head runat=”server”> <title>NumericUpDownExtender Control</title> </head> <body> <form […]

Filed Under: asp.net

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright