Skip to content

Instantly share code, notes, and snippets.

View deep5050's full-sized avatar
💻
EMBEDDED SYSTEM

Dipankar Pal deep5050

💻
EMBEDDED SYSTEM
View GitHub Profile
inljnlnlnlnlnlnkh kj
inljnlnlnlnlnlnkh kj
#!/bin/bash
if [ $# -lt 2 ]; then
echo "Usage: $0 <file_path> <public/private>"
exit 1
fi
file_path=$1
visibility=$2
@deep5050
deep5050 / vimrc
Last active January 20, 2025 16:35
The ultimate vimrc you will ever need !!
" Set filetype to C for C files
autocmd BufNewFile,BufRead *.c,*.h,*.cpp,*.hpp set filetype=c
set encoding=utf-8
set fileencoding=utf-8
set fileformats=unix,dos,mac
set ruler
set hidden
set statusline=%F
set nolist
@deep5050
deep5050 / HimalayanTreks.txt
Created February 21, 2025 14:41
List of treks in India in the Himalayan range
# Ladakh
Markha Valley Trek (Ladakh)
Stok Kangri Trek (Ladakh)
Zanskar Valley Trek (Ladakh)
Khardung La Trek (Ladakh)
Siachen Base Camp Trek (Ladakh)
Ladakh to Zanskar Trek (Ladakh)
Nubra Valley Trek (Ladakh)
Zanskar River Trek (Ladakh)
Suru Valley Trek (Ladakh)
@deep5050
deep5050 / HimalaynTreks.json
Created February 21, 2025 15:01
Himalayan Treks in JSON
[
{
"name": "Markha Valley Trek",
"difficulty": "Moderate",
"location": "Ladakh",
"state": "Jammu and Kashmir",
"country": "India",
"altitude_m": 5000,
"altitude_ft": 16404,
"longitude": 77.5833,
@deep5050
deep5050 / add_border.py
Created February 22, 2025 11:51
Add border to images
import argparse
from PIL import Image, ImageDraw
def add_borders(input_image_path, output_image_path, border_width=10, border_color="white", rounded_border=False, rounded_image=False):
# Open the original image
with Image.open(input_image_path) as img:
# Calculate the new size
new_size = (img.width + 2 * border_width, img.height + 2 * border_width)
# Create a new image with the specified background color