Skip to content

Instantly share code, notes, and snippets.

@esmaeelE
esmaeelE / gitbook.md
Created January 1, 2026 09:19
Create Rust book and Publish on github account

Make a book fast with mdbook and publish faster


0. Prerequisites (once)

Make sure you have these locally:

git --version
@esmaeelE
esmaeelE / mirror.md
Created January 1, 2026 05:24
Make mirror from a website

Make an offline mirror from statics websites, like blogs

httrack http://example.org

or if its not work

wget -mkEpnp http://example.org
@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