Skip to content

Instantly share code, notes, and snippets.

View MalikAbuShabab's full-sized avatar
🧑‍💻
Focusing

Malik Abo Shabab MalikAbuShabab

🧑‍💻
Focusing
View GitHub Profile
@MalikAbuShabab
MalikAbuShabab / backup_odoo.sh
Last active August 3, 2024 13:06
Odoo Backup
#!/bin/bash
# vars
BACKUP_DIR=~/odoo_backups
ODOO_DATABASE=db1
ADMIN_PASSWORD=superadmin_passwd
# create a backup directory
mkdir -p ${BACKUP_DIR}
@MalikAbuShabab
MalikAbuShabab / organize.py
Last active May 12, 2025 19:47
Script organizing files and dividing them into folders according to their type
import os
import shutil
home_path = os.getcwd()
print("\t [+] Welcome in organize.py script - happy clean folder ;) \n")
images = 0
Code = 0
Docs = 0
archive = 0
for file in os.listdir(home_path):
@MalikAbuShabab
MalikAbuShabab / tmux.conf
Last active April 18, 2020 16:09
tmux.conf
# Our .tmux.conf file
# Setting the prefix from C-b to C-a
set -g prefix C-a
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -sg escape-time 1
# Ensure that we can send Ctrl-A to other apps
bind C-a send-prefix
# Set the base index for windows to 1 instead of 0
@MalikAbuShabab
MalikAbuShabab / Binary_serarch.py
Last active January 18, 2020 21:33
Binary search is an efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one.
"""
Suppose you give the following list of 8 items which is
in ascending order and we want to search for the value 25
"""
matrix = [0,11,16,18,25,29,32,35] # Create matrix
def binary_search(m, matrix):
first =1 # Determine the starting first value