Skip to content

Instantly share code, notes, and snippets.

View Mehrdad-Dadkhah's full-sized avatar

Mehrdad-Dadkhah

View GitHub Profile
@Mehrdad-Dadkhah
Mehrdad-Dadkhah / writing_system_prompt.md
Created May 28, 2025 16:30
my writing system prompt

🎛️ مشخصات عمومی محتوا

شخصیت برند: حرفه‌ای، متفکر، مردمی، الهام‌بخش، متواضع اما با موضع مشخص و کمی طنز لحن: خودمانی-محترمانه، روایت‌محور، مشوق تفکر، گاهی حماسی، گاهی طناز
مخاطب هدف: برنامه‌نویسان، مدیران فنی، متخصصان فناوری، علاقه‌مندان رشد فردی، مدیران عامل (مهم ترین گروه) هدف نهایی: ایجاد بینش، ساختن رابطه، اثرگذاری بلندمدت، و تبدیل خواننده به هوادار


🧠 ساختار تولید محتوا

@Mehrdad-Dadkhah
Mehrdad-Dadkhah / CTO_system_propmpt.md
Last active June 24, 2025 10:39
Hossein Dadkhah, CTO system prompt for LLMs

تو نقش یک مدیر ارشد فناوری (CTO) در یک شرکت نرم‌افزاری مبتنی بر وب را بازی می‌کنی. شخصیت تو دقیق، تحلیل‌گر، سخت‌گیر، و متعهد به اصول معماری و طراحی حرفه‌ای است. مأموریت تو تحلیل، تصمیم‌سازی و ارائه راهکارهای تکنولوژیک در بالاترین سطح استاندارد صنعتی است — با درک کامل از نیازهای فنی، تجاری و انسانی تیم.

✅ اصول بنیادین عملکرد تو:

● همیشه به شدت بر جلوگیری از انتقال Business Logic به سمت کلاینت تأکید کن

@Mehrdad-Dadkhah
Mehrdad-Dadkhah / LEARN_REGEX.md
Created January 19, 2025 04:51
آموزش خیلی مختصر ریجکس - regex

به بهانه یه کد خیلی ساده برای wrap کردن کدهای embed آپارات، یکم ریجکس یاد بگیریم... (یا شاید مرور کنیم)

بذار خیلی ساده توضیح بدم که این کد چیکار می‌کنه و ریجکس (Regular Expression) اصلاً چیه و چرا استفاده شده.


اول از همه: ریجکس چیه؟

ریجکس یه ابزار یا بهتر بگم یه سیستم نوشتاری برای تعریف الگوها توی متن‌هاست. این ابزار یه سری قواعد و سینتکس (syntax) داره که شبیه یه زبان کوچیک عمل می‌کنه. توش می‌تونی با استفاده از کاراکترهای خاص و قوانینش، به کامپیوتر بگی: “برو این الگو رو توی متن پیدا کن.”


@Mehrdad-Dadkhah
Mehrdad-Dadkhah / README.md
Created January 8, 2025 09:09
Secure Image Encryption Class

Secure Image Encryption Class Analysis

The SecureImageEncryption class is designed for image encryption utilizing the AES-256-CBC algorithm. This class facilitates the secure storage of images in an encrypted format and provides the capability to decrypt them when needed.

Rationale for Image Encryption

Several critical reasons underpin the need for image encryption:

  • Data Protection: Images may contain sensitive information. Encryption prevents unauthorized access to this data, ensuring confidentiality.
  • Secure Storage: By encrypting images before storing them in a database or file system, the primary content remains unintelligible even if unauthorized access to the data occurs. This adds a crucial layer of security.
@Mehrdad-Dadkhah
Mehrdad-Dadkhah / README.md
Last active April 5, 2025 14:30
High performance MySQL configuration with complete description and formulas.

MySQL Configuration Guide

Overview

This document provides a comprehensive explanation of the MySQL configuration settings used in the provided configuration file. The settings are optimized for a high-performance MySQL server with a focus on balancing memory usage, CPU utilization, and disk I/O efficiency. The comments in the file also include guidelines for adjusting parameters based on server hardware and workload characteristics.

General Settings

innodb_buffer_pool_size

  • Description: The size of the InnoDB buffer pool, which caches data and indexes from InnoDB tables.
@Mehrdad-Dadkhah
Mehrdad-Dadkhah / installFFmpeg.sh
Last active December 4, 2017 14:05
Compile FFmpeg on Ubuntu, Debian, or Mint. install on Ubuntu, Debian, and Linux Mint it will provide a local install of the latest FFmpeg tools and libraries including several external encoding and decoding libraries (codecs).
#!/usr/bin/env bash
set -eo pipefail
set -x
apt-get update
apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \
libsdl2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \
libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev libnuma-dev
mkdir -p ~/ffmpeg_sources