Skip to content

Instantly share code, notes, and snippets.

View meepak's full-sized avatar

Deepak Mahat meepak

View GitHub Profile
@meepak
meepak / lidmin.py
Last active December 8, 2025 09:58
Linux sysadmin script using Open AI API - It will perform the any task asked in the given server details..
import json
import time
from typing import List, Dict, Any
import paramiko
import subprocess
import select
from openai import OpenAI
#!/bin/bash
# Function to exit on error
exit_on_error() {
echo "Error: $1"
exit 1
}
# Stop all running Docker containers
echo "Stopping all Docker containers..."
#!/bin/bash
# Function to exit on error
exit_on_error() {
echo "Error: $1"
exit 1
}
# Update system
sudo apt update || exit_on_error "Failed to update package list"
@meepak
meepak / Set-BgInfo.ps1
Created September 5, 2024 00:02
PowerShell script to add a custom context menu item to windows Desktop, that uses BgInfo.exe from SysInternals to display PC info on desktop.
<#/
.SYNOPSIS
PowerShell script to add a custom context menu item to windows Desktop,
that uses BgInfo.exe from sysinternals to display PC info on desktop.
.DESCRIPTION
This script sets up BGInfo by downloading it if necessary, creating a batch file to run it,
and adding a context menu item to the desktop background for easy access.
- dpk, 09/2024
@meepak
meepak / nvim-as-laravel-ide-setup.sh
Last active August 28, 2024 02:11
Setup CLI editor (neovim + plugins) for laravel development. Supports file browsing, intellisense, CTRL click to jump to references, PHP debugging, blade syntax, vuejs, prettify , etc, etc.
#!/bin/bash
# Function to print error messages
error_exit() {
echo "Error: $1"
exit 1
}
# Function to generate ctags with a progress bar, only for new/modified files
generate_ctags() {
@meepak
meepak / touchsceen-toggle.sh
Created December 3, 2023 04:21
Cinnamon panel launcher - add quick touchscreen toggle button
#!/bin/bash
# Set the device name, find it using xinput list
# deviceName="G2Touch Multi-Touch by G2TSP"
# Get touchscreen device id, if it's too slow, hardcode it
# deviceId=$(xinput list | grep "$deviceName" | awk '{print $7}' | awk -F '=' '{print $2}')
# Hardcoding this because it seems a bit slow and the cursor disappears
deviceId=11