Skip to content

Instantly share code, notes, and snippets.

View esmaeelE's full-sized avatar
🎯
Focusing

esmaeelE esmaeelE

🎯
Focusing
View GitHub Profile
@esmaeelE
esmaeelE / yt_dl.md
Created December 31, 2025 09:49
Youtube download
@esmaeelE
esmaeelE / vscode_autoformat.md
Last active December 28, 2025 09:14
Configure vscode to autoformat file when press ctrl + s

How to Auto-Format Dockerfiles and docker-compose in VS Code

This guide helps you automatically format your Dockerfile every time you press Ctrl+S in Visual Studio Code – no manual steps required! Debian/Ubuntu Edition

It also includes optional setup for Hadolint (a popular Dockerfile linter) to highlight best practices, security issues, and inefficiencies in real time.

Step 1: Install dockerfmt (Formatter) on Debian/Ubuntu

dockerfmt is the tool that formats your Dockerfile (indentation, multi-line RUN commands, etc.).

@esmaeelE
esmaeelE / node.md
Created December 26, 2025 18:08
node install
@esmaeelE
esmaeelE / ELK.md
Created December 23, 2025 08:46
Install ELK

ELK Stack Installation Guide

(Elasticsearch, Logstash, Kibana)

This guide explains how to install the ELK Stack either on bare metal or using Docker.


Option 1: Bare Metal Installation

@esmaeelE
esmaeelE / jcal.md
Last active December 22, 2025 06:38
jcal for Debian 12

Jcal have a bug in Debian 12 which show wrong day of month. But it fixed in newer releases.

To use newer version on Debian 12, download compiled binary from here

Remove old version from debian 12

$ sudo apt purge jcal
@esmaeelE
esmaeelE / gitcommit_remove.bash
Created December 21, 2025 19:53
Remove git history and make current state only and first commit
pip install commitcleaner
cd {your project}
commitcleaner
https://stackoverflow.com/a/77907349/7508077
@esmaeelE
esmaeelE / gre_tunnel.sh
Created September 18, 2025 06:03
gre_tunnel.sh
#!/bin/bash
# grab from [Understanding GRE tunnels using Linux network namespaces](https://routemyip.com/posts/linux/networking/gre-tunnels/)
# great article by Sarath Chandra Mekala.
# Enable gre kernel module
modprobe ip_gre
# Create the network namespaces
ip netns add host1
@esmaeelE
esmaeelE / purge_tunnel.sh
Created September 18, 2025 05:56
purge_tunnel.sh
#!/bin/bash
# remove all network namespaces and disable ipip and ip_gre kernel modules
ip netns delete host1
ip netns delete host2
ip netns delete internet
modprobe -r ipip
modprobe -r ip_gre
@esmaeelE
esmaeelE / ipip_tunnel.sh
Last active September 18, 2025 05:55
make ipip_tunnel with linux network namespace.
#!/bin/bash
# grab from [IP in IP (IPIP) tunnels using linux network namespaces](https://routemyip.com/posts/linux/networking/ipip-tunnels/)
# great article by Sarath Chandra Mekala.
# Enable IPIP module
modprobe ipip
# Create the network namespaces
ip netns add host1
@esmaeelE
esmaeelE / cargo-clean.sh
Created July 20, 2025 07:19 — forked from cmackenzie1/cargo-clean.sh
Run cargo clean on multiple directories.
#!/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
# Function to display error messages and exit
error_exit() {
echo "Error: $1" >&2
exit 1
}