Skip to content

Instantly share code, notes, and snippets.

@hemanth22
hemanth22 / ssh_banner.md
Last active October 24, 2025 18:00
ssh

First create a banner

vi /etc/ssh/sshd_banner
    #########################################
    # Welcome to My Rocky Linux 9 Server! #
 # Authorized access only. #
@hemanth22
hemanth22 / windows-keys.md
Created September 14, 2025 05:55 — forked from rvrsh3ll/windows-keys.md
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@hemanth22
hemanth22 / mariadb.md
Last active March 1, 2025 12:00
mariadb in podman
podman volume create mariadb-data
podman volume ls
podman run -d --name mariadb-container -e MYSQL_ROOT_PASSWORD=bitroid -e MYSQL_USER=bitra -e MYSQL_PASSWORD=bitra -e MYSQL_DATABASE=defaultdb -v mariadb-data:/var/lib/mysql -p 6603:3306 docker.io/library/mariadb:latest
@hemanth22
hemanth22 / baseURL.groovy
Created February 3, 2025 16:37 — forked from fishi0x01/baseURL.groovy
This is a collection of groovy scripts I gathered and use for bootstrapping Jenkins. Most of this can also be achieved with the CasC Plugin https://github.com/jenkinsci/configuration-as-code-plugin
#!groovy
/*
* This script configures the Jenkins base URL.
*/
import jenkins.model.JenkinsLocationConfiguration
JenkinsLocationConfiguration location = Jenkins.instance.getExtensionList('jenkins.model.JenkinsLocationConfiguration')[0]
location.url = 'https://jenkins-as-code-poc.devtail.io/'
@hemanth22
hemanth22 / CKA exam cheat sheet
Created June 19, 2024 01:47 — forked from Nurlan199206/CKA exam cheat sheet
CKA exam cheat sheet
useful resources: https://github.com/ascode-com/wiki/tree/main/certified-kubernetes-administrator
alias ll='ls -l'
alias kcr='kubectl create'
alias ka='kubectl apply -f'
alias k=kubectl
alias kg='kubectl get'
alias ke='kubectl edit'
alias kd='kubectl describe'
alias kdd='kubectl delete'
@hemanth22
hemanth22 / convert-p12-pem-formats.bash
Created November 29, 2023 08:25 — forked from Integralist/convert-p12-pem-formats.bash
Convert a P12 into a PEM and vice versa
# Convert p12 to pem
openssl pkcs12 -in certificate.p12 -out certificate.pem -clcerts -nodes
# Convert pem to p12
openssl pkcs12 -export -in certificate.pem -out certificate.p12 -passout pass:password
@hemanth22
hemanth22 / convert-deploymentconfig-to-deployment.md
Created November 29, 2023 08:24 — forked from bmaupin/convert-deploymentconfig-to-deployment.md
Convert OpenShift DeploymentConfig to Kubernetes Deployment
  1. Change apiVersion from:

    - apiVersion: v1

    (or apiVersion: apps.openshift.io/v1)

    to:

@hemanth22
hemanth22 / deployment.yml
Created November 12, 2023 15:17 — forked from troyharvey/deployment.yml
Using Kubernetes envFrom for environment variables
# Use envFrom to load Secrets and ConfigMaps into environment variables
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mans-not-hot
labels:
app: mans-not-hot
spec:
replicas: 1
@hemanth22
hemanth22 / python_ssh_jsch.py
Created June 16, 2023 15:43 — forked from huskercane/python_ssh_jsch.py
SSH from jython using jsch
I have to make ssh calls from python, there are few options
however we run in jython and it runs automated, so adding extension is difficult.
luckily we have access to jsch jars.
here is a example on how to connect to a ssh server using jsch from python/jython
from com.jcraft.jsch import JSch