Skip to content

Instantly share code, notes, and snippets.

View ankitg12's full-sized avatar
🎯
Focusing

Ankit Gaur ankitg12

🎯
Focusing
View GitHub Profile
{
"meta": { "theme": "stackoverflow" },
"basics": {
"name": "Ankit Gaur",
"label": "",
"picture": "",
"website": "https://www.linkedin.com/in/ankitgaur/",
"summary": "SDET/QA engineer with over 12 years' experience in Networking, Web Security, Network Security and Media Streaming domain. B.E (Hons.) Electronics and Instrumentation, BITS Pilani, 2008. CCNA (2011) Certified. AWS Solution Architect Associate (2019) Certified",
"location": {
@ankitg12
ankitg12 / pre-start-agfhc.yaml
Created November 12, 2025 14:34
Testrunner yaml for agfhc as prestart job
apiVersion: apps/v1
kind: Deployment
metadata:
name: pytorch-gpu-deployment
namespace: default
labels:
purpose: demo-pytorch-amdgpu
spec:
replicas: 1
selector:
@ankitg12
ankitg12 / aliases.sh
Created February 11, 2026 16:14
aliases
alias k='kubectl'
alias kdn='k describe node'
alias kdp='k describe pod'
alias kgn='k get nodes -owide'
alias kgp='k get pod -owide'
alias kdelp='k delete pod'
alias kn='kubectl -n oc-amd-network'
alias kg='kubectl -n openshift-amd-gpu'
alias kggp='kubectl -n openshift-amd-gpu get pod -owide'
alias kgdp='kubectl -n openshift-amd-gpu describe pod'
@ankitg12
ankitg12 / k9s-setup-light-mode.sh
Created February 17, 2026 11:11
Setup light mode in k9s #k9s
#!/usr/bin/env bash
set -e
# install yq if not installed
if ! yq --version >/dev/null 2>&1; then
echo "Installing yq..."
sudo curl -fsSL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
-o /usr/local/bin/yq
sudo chmod +x /usr/local/bin/yq
fi
@ankitg12
ankitg12 / .screenrc
Created February 17, 2026 11:30
My .screenrc (inspired from Christian Wills's)
# GNU Screen - main configuration file
# All other .screenrc files will source this file to inherit settings.
# Author: Christian Wills - cwills.sys@gmail.com
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
@ankitg12
ankitg12 / common.sh
Last active February 18, 2026 10:24
Setup My Environment
# =====================================================
# Basic Shell Safety
# =====================================================
set -o noclobber # prevent accidental file overwrite with >
set -o pipefail # pipeline fails if any command fails
# =====================================================
# History Configuration (High ROI)
# =====================================================
@ankitg12
ankitg12 / .bashrc
Last active February 18, 2026 08:05
My Bashrc #bashrc
# =====================================================
# Basic Shell Safety
# =====================================================
set -o noclobber # prevent accidental file overwrite with >
set -o pipefail # pipeline fails if any command fails
# =====================================================
# History Configuration (High ROI)
# =====================================================
@ankitg12
ankitg12 / Microsoft.PowerShell_profile.ps1
Created February 28, 2026 01:06
Powershell Profile
# Put below in $PROFILE file
Set-PSReadLineKeyHandler -Key Ctrl+d -Function ViExit
Set-PSReadLineKeyHandler -Key Tab -Function AcceptSuggestion
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
'@
@ankitg12
ankitg12 / push-key.ps1
Created February 28, 2026 18:29
Windows Powershell Script to Push SSH Keys Using plink
<#
.SYNOPSIS
Push an SSH public key to a remote Linux host using PuTTY plink.
.DESCRIPTION
- Adds the given public key to ~/.ssh/authorized_keys
- Avoids duplicates
- Creates ~/.ssh if missing
- Uses base64 encoding to safely transmit the key
@ankitg12
ankitg12 / claude_profile.ps1
Created March 1, 2026 09:10
Claude Session Manager
# Run below two commands first and add rest of file in your power shell profile $PROFILE
# $CLAUDE_HOME = "$env:USERPROFILE\.claude"
# New-Item -ItemType Directory -Force -Path $CLAUDE_HOME, "$CLAUDE_HOME\sessions" | Out-Null
function claude {
$CLAUDE_HOME = "$env:USERPROFILE\.claude"
$timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
$sessionDir = Join-Path $CLAUDE_HOME "sessions\$timestamp"
New-Item -ItemType Directory -Force -Path $sessionDir | Out-Null