Skip to content

Instantly share code, notes, and snippets.

View shashanthk's full-sized avatar

Shashanth shashanthk

  • Mangaluru, Karnataka, India
View GitHub Profile
@shashanthk
shashanthk / starship.toml
Last active June 24, 2025 10:17
My custom Starship config file
# Prerequisites:
# 1. Starship installed (https://starship.rs/)
# 2. A Nerd Font installed and enabled in your terminal.
# Recommended: FiraCode Nerd Font, JetBrainsMono Nerd Font
# Increase the timeout Starship will wait for external commands (in milliseconds)
command_timeout = 10000
# 🎨 PALETTES ---------------------------------------------------------------
# Switch your theme by changing the 'palette' variable below.
@shashanthk
shashanthk / git-fast-forward-config.md
Created May 24, 2025 08:32
Git fast-forward config

Let's break down these two Git configuration commands:

  • git config --global pull.ff always
  • git config --global merge.ff false

Both commands use --global, meaning these settings will apply to all your Git repositories on your system, unless overridden by a local repository configuration.


git config --global pull.ff always

@shashanthk
shashanthk / server_logging_monitoring.md
Created March 30, 2025 14:45
Linux logging technique resources

Blogs related to system management and log monitoring.

  1. [Linux Event Logs][1]
  2. [How to Monitor Error Logs in Real-Time][2]
  3. [Log Retention: Policies, Best Practices & Tools][3]
  4. [End-to-End Monitoring][4]
  5. [systemctl: The Complete Guide to Managing Linux Services][5]
  6. [Nginx Logging: A Complete Guide for Beginners][6]
  7. [Tomcat Logs: Locations, Types, Configuration, and Best Practices][7]
  8. [Postgres Logs 101: Types, Configuration, and Troubleshooting][8]
@shashanthk
shashanthk / tmux_shortcut.md
Created September 4, 2024 17:33
tmux shortcuts

Table of common tmux shortcuts and commands:

Action Shortcut/Command
Start a new session tmux or tmux new -s session_name
Detach from session Ctrl-b, then d
List sessions tmux ls
Attach to a session tmux attach -t session_name
Kill a session tmux kill-session -t session_name
Split window horizontally Ctrl-b, then %
@shashanthk
shashanthk / Dockerfile.springboot
Created July 27, 2024 11:50
Building Docker image using Spring Boot code
## JDK
FROM eclipse-temurin:21-alpine AS builder
## install maven CLI
RUN apk add --no-cache maven
## container directory
WORKDIR /app
## copy the pom.xml and download the dependencies
@shashanthk
shashanthk / Dockerfile.springboot
Created July 27, 2024 11:31
Simple Docker file for Spring Boot project
## JDK
FROM eclipse-temurin:21-alpine
## container direcotry
WORKDIR /app
## copy build file from host to container
COPY target/jar-file-name.jar /app
## expose service port
@shashanthk
shashanthk / pentaho.domain.ini
Last active July 12, 2024 06:18
Pentaho server auth without exposing username and password via Nginx
upstream pentaho-server {
server <PENTAHO_SERVER_IP>:<PENTAHO_PORT>;
}
server {
## default listen port
listen 80;
## domain name
@shashanthk
shashanthk / generate_error_files.sh
Last active February 25, 2025 17:33
HTTP standard error page generator
#!/bin/bash
# HTTP standard error code and its message
declare -A http_status_list=(
[400]="Bad Request"
[401]="Unauthorized"
[402]="Payment Required"
[403]="Forbidden"
[404]="Not Found"
[405]="Method Not Allowed"
@shashanthk
shashanthk / pg_backup_script.sh
Last active July 24, 2023 05:23
Simple shell script to take Postgres database backup and compress it to .gz format
#!/bin/sh
# Dump DBs
dir="/path/to/backup/"
date=`date +"%Y_%m_%d_%H_%M_%S"`
filename="database_name_${date}.sql"
cd $dir
echo "\nBackup in progress...\n"
@shashanthk
shashanthk / vs_code_settings_linux.json
Created January 4, 2021 17:07
My VS Code settings (LinuxMint)
{
"workbench.startupEditor": "newUntitledFile",
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.fontFamily": "'Source Code Pro',monospace",
"editor.lineHeight": 24,
"git.branchSortOrder": "alphabetically",
"git.showProgress": true,
"editor.matchBrackets": "always",
"workbench.list.openMode": "doubleClick",