Skip to content

Instantly share code, notes, and snippets.

View drhema's full-sized avatar

Ibrahim Elsherbiny drhema

View GitHub Profile
#!/bin/bash
#==============================================================================
# PostgreSQL Multi-Tenant SaaS - Complete Uninstall Script
#==============================================================================
# This script completely removes PostgreSQL, PgBouncer, and all configurations
# WARNING: This will DELETE ALL DATABASES and data!
#==============================================================================
set -e
#!/usr/bin/env bash
#
# PostgreSQL 16 Server Setup for Multi-Tenant SaaS
# DNS Challenge Edition - Compatible with Nginx Proxy Manager
# Complete installation with SSL via Cloudflare DNS, control database, and management utilities
# Run on Ubuntu 24.04 as root
#
set -euo pipefail
@drhema
drhema / postgres.sh
Last active November 17, 2025 16:57
#!/usr/bin/env bash
#
# PostgreSQL 16 Server Setup for Multi-Tenant SaaS
# Complete installation with SSL, control database, and management utilities
# Run on Ubuntu 24.04 as root
#
set -euo pipefail
# Colors for output
#!/bin/bash
#################################################
# PostgreSQL 16 + TimescaleDB + pgAdmin 4 Setup
# Optimized Self-Hosted Stack with IP Whitelisting
# Version: 2.0.0 - Fixed pgAdmin email validation
#################################################
set -e
#!/bin/bash
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
echo -e "${GREEN}=== Starting Proxmox Installation on Debian 12 ===${NC}"
# Set hostname
import React, { useState } from 'react';
import { Shield, Wind, Paintbrush, Car, ChevronDown, Search, CheckCircle, X, Filter } from 'lucide-react';
const ProtectionPackages = () => {
const [activeTab, setActiveTab] = useState('all');
const [searchTerm, setSearchTerm] = useState('');
const [showFilters, setShowFilters] = useState(false);
const [selectedBrands, setSelectedBrands] = useState([]);
const [language, setLanguage] = useState('dual'); // 'en', 'ar', or 'dual'
/**
* Plugin Name: WooCommerce Installation Service Add-on
* Description: Adds installation service option for specific product categories
* Version: 1.1
*/
if (!defined('ABSPATH')) {
exit;
}
<div class="container mx-auto mt-8 px-4 lg:px-0">
<!-- Sticky Add to Cart for Mobile -->
<div id="sticky-add-to-cart" class="fixed top-0 left-0 right-0 bg-white shadow-md z-50 py-2 px-3 hidden transform transition-transform duration-300 -translate-y-full">
<div class="flex items-center justify-between">
<!-- Product Thumbnail -->
<div class="flex items-center">
<div class="h-12 w-12 bg-gray-100 rounded-md overflow-hidden flex-shrink-0 mr-3">
<%= if @product["base_image"] do %>
<img
src={@product["base_image"]["small_image_url"]}
#!/usr/bin/env bash
# ===================================
# Enhanced Redis Installation Script for Phoenix Ecommerce App
# Optimized for caching workloads with security and performance settings
# ===================================
# Ensure the script is run as root or with sudo
if [ "$(id -u)" != "0" ]; then
echo "Please run this script as root (sudo)."