Skip to content

Instantly share code, notes, and snippets.

@kpratikshak
kpratikshak / Provider.tf
Created February 22, 2026 09:32
gcp VPC, network subnet creation automation
terraform {
required_version = ">= 1.0"
required_providers {
google = {
source = "hashicorp/google"
version = "~> 5.0"
}
google-beta = {
@kpratikshak
kpratikshak / log_analysis_linux.sh
Created February 19, 2026 12:05
bulk_log_analysis_linux with bash
# Variables
REPORT_FILE="log_summary_report_$(date +%F).txt"
ERROR_KEYWORDS=("ERROR" "Failed")
CRITICAL_KEYWORD="CRITICAL"
echo "Analyzing log file: $LOG_FILE"
# Total lines processed
TOTAL_LINES=$(wc -l < "$LOG_FILE")

how to setup a web server using a basic static site served using Nginx. You should also have a basic understanding of how to use rsync to deploy your changes to the server.

What you’ll build

A remote Linux VM (Ubuntu is easiest)

Nginx serving a static site from /var/www/static-site

A local project folder (HTML/CSS/images)

@kpratikshak
kpratikshak / jenkins_commands.sh
Created February 3, 2026 17:03
Bash commands to install jenkins on Linux
# Basic Jenkins commands
http://localhost:8080
# Download Jenkins CLI
wget http://localhost:8080/jnlpJars/jenkins-cli.jar
# Test CLI connection
java -jar jenkins-cli.jar -s http://localhost:8080 help
# List available commands
java -jar jenkins-cli.jar -s http://localhost:8080 help