Skip to content

Instantly share code, notes, and snippets.

View monzim's full-sized avatar

AZRAF AL MONZIM monzim

View GitHub Profile
@monzim
monzim / dynamic_fix_grub.sh
Last active July 22, 2025 10:33
Helper script to repair GRUB
#!/bin/bash
# Function to find the root partition (likely Linux filesystem)
find_root_partition() {
ROOT_PART=$(lsblk -o NAME,FSTYPE,MOUNTPOINT | grep -E 'ext4|xfs|btrfs' | grep -v '/boot' | awk '{print "/dev/" $1}' | head -n 1)
if [ -z "$ROOT_PART" ]; then
echo "Error: No root partition found. Please check with 'lsblk'."
exit 1
fi
echo "$ROOT_PART"
@monzim
monzim / main.py
Created February 14, 2025 03:08
Python - 101
import heapq
def dijkstra(graph, start):
dist, pq = {start: 0}, [(0, start)]
while pq:
d, node = heapq.heappop(pq)
for w, v in graph.get(node, []):
new_d = d + w
if new_d < dist.get(v, float('inf')):
dist[v] = new_d
@monzim
monzim / Curl WIndows
Last active October 2, 2024 07:05
Curl Test
curl -o NUL -s -w "DNS Lookup: %{time_namelookup}\nConnect Time: %{time_connect}\nStart Transfer Time: %{time_starttransfer}\nTotal Time: %{time_total}\n" http://example.com
@monzim
monzim / c.json
Last active July 14, 2024 04:06
VsCode Snippets
{
"do sqr root with binnary": {
"prefix": "doSqtBinarry",
"body": [
"#include <stdio.h>",
"",
"int sqrtHelper(int x, int low, int high) {",
" if (low > high) {",
" return high;",
" }",
@monzim
monzim / Ubunut-Install-Docker.sh
Last active May 20, 2024 07:57
Install Docker on Ubunut and add to SUDO group
## STEP 1
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
@monzim
monzim / docker-compsoe.yml
Created March 18, 2024 04:27
Docker compose file postgres
version: "3.9"
services:
postgres:
image: postgres:latest
ports:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql/data
networks:
{"name":"monzim-JAVA","settings":"{\"settings\":\"{\\n \\\"workbench.sideBar.location\\\": \\\"right\\\",\\n \\\"workbench.iconTheme\\\": \\\"material-icon-theme\\\",\\n \\\"workbench.colorTheme\\\": \\\"Dobri Next -A03- Mirage\\\"\\n}\"}","extensions":"[{\"identifier\":{\"id\":\"aaron-bond.better-comments\",\"uuid\":\"7a0110bb-231a-4598-aa1b-0769ea46d28b\"},\"displayName\":\"Better Comments\"},{\"identifier\":{\"id\":\"adpyke.codesnap\",\"uuid\":\"8c1fc960-44b1-45e8-89b5-85f982fdaf27\"},\"displayName\":\"CodeSnap\"},{\"identifier\":{\"id\":\"ankitcode.firefly\",\"uuid\":\"fb1a0ad6-6285-4b5e-b07d-826dee8e2a85\"},\"displayName\":\"FireFly Pro\"},{\"identifier\":{\"id\":\"azemoh.one-monokai\",\"uuid\":\"b027c4b2-25ad-46db-b574-05dae3b2dc92\"},\"displayName\":\"One Monokai Theme\"},{\"identifier\":{\"id\":\"chakrounanas.turbo-console-log\",\"uuid\":\"6623619a-676d-4cde-943f-a3c193b44fc0\"},\"displayName\":\"Turbo Console Log\"},{\"identifier\":{\"id\":\"codezombiech.gitignore\",\"uuid\":\"3e891cf9-53cb-
{"name":"Flutter-Open","settings":"{\"settings\":\"{\\r\\n \\r\\n // Remove .fvm files from search\\r\\n \\\"search.exclude\\\": {\\r\\n \\\"**/.fvm\\\": true\\r\\n },\\r\\n // Remove from file watching\\r\\n \\\"files.watcherExclude\\\": {\\r\\n \\\"**/.fvm\\\": true\\r\\n },\\r\\n\\r\\n \\\"[dart]\\\": {\\r\\n \\\"editor.formatOnSave\\\": true,\\r\\n \\\"editor.formatOnType\\\": true,\\r\\n \\\"editor.selectionHighlight\\\": false,\\r\\n \\\"editor.suggest.snippetsPreventQuickSuggestions\\\": true,\\r\\n \\\"editor.suggestSelection\\\": \\\"first\\\",\\r\\n \\\"editor.tabCompletion\\\": \\\"on\\\",\\r\\n \\\"editor.wordBasedSuggestions\\\": false,\\r\\n \\\"editor.codeActionsOnSave\\\": {\\r\\n \\\"source.fixAll\\\": true\\r\\n },\\r\\n \\\"editor.defaultFormatter\\\": \\\"Dart-Code.dart-code\\\",\\r\\n \\\"editor.autoClosingBrackets\\\": \\\"always\\\",\\r\\n \\\"editor.suggest.showValues\\\": true,\\r\\n \\\"editor.suggest.showOperators\\\": true\\r
@monzim
monzim / Khabor-Privacypolicy.txt
Created April 6, 2022 07:50
Privacy policy Khabor App
Azraf Al Monzim built the Khabor app as a Free app. This SERVICE is provided by Azraf Al Monzim at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at Khabor unless otherwise defined in this Privacy Policy.
Information Collection and Use
For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I request will be retained on your device and is not collected by
@monzim
monzim / Al-AsrVim_install.sh
Last active March 13, 2022 15:56
Al-AsrVim installer Script
#!/usr/bin/env bash
declare -r INSTALL_PREFIX="${INSTALL_PREFIX:-"$HOME/.local"}"
function detect_platform_install_neovim_fzf() {
OS="$(uname -s)"
case "$OS" in
Linux)
if [ -f "/etc/arch-release" ] || [ -f "/etc/artix-release" ]; then
echo "System Detected Arch"