Skip to content

Instantly share code, notes, and snippets.

View jalallinux's full-sized avatar
😎
ABC: Always Be Coding

JalalLinuX jalallinux

😎
ABC: Always Be Coding
View GitHub Profile
@jalallinux
jalallinux / contract-hourly.md
Created October 14, 2025 07:24
قرارداد ساعتی

قرارداد همکاری ساعتی (پیمانی)

تاریخ تنظیم: __ / __ / ____

این قرارداد به موجب قانون کار جمهوری اسلامی ایران و آیین‌نامه‌های اجرایی مربوطه منعقد می‌گردد.


اطلاعات طرفین قرارداد

@jalallinux
jalallinux / interview.md
Last active October 14, 2025 08:27
Interview Titles

Laravel Backend Interview Checklist

DB ACID

  • Atomicity, Consistency, Isolation, Durability
  • Isolation Levels (Read Uncommitted, Read Committed, Repeatable Read, Serializable)
  • Transactions در Laravel
  • Indexing و Performance

@jalallinux
jalallinux / json_get.php
Created October 8, 2025 05:59
Search on JSON with a special conversion
<?php
if (! function_exists('json_get')) {
/**
* Get value from JSON array using dot notation or array search
*
* @param array $data JSON data
* @param string $path Path like "current.geram24" or "gold.*.symbol:IR_GOLD_18K"
* @return mixed
*/
@jalallinux
jalallinux / PaginationAndSortableAndSearchableValidator.php
Last active July 29, 2025 13:50
PaginationAndSortableAndSearchableValidator Trait
<?php
namespace Modules\General\Contracts\Request;
trait PaginationAndSortableAndSearchableValidator
{
public function page(): int
{
return intval($this->query(self::pageKey(), 1));
}
@jalallinux
jalallinux / project-documents.md
Last active June 22, 2025 08:21
Types of project document

📁 مستندات پروژه – نسخه نهایی

در این سند، تمامی مستندات کلیدی پروژه به همراه توضیحات، نویسنده، تحویل‌گیرنده و زمان تولید به ترتیب منطقی آورده شده‌اند.


1. Project Brief (خلاصه پروژه)

  • معرفی کلی پروژه، هدف، دامنه، خروجی مورد انتظار، مخاطبین هدف، ریسک‌های سطح بالا.
  • ✍️ نویسنده: کارفرما / مدیر محصول
  • 📥 تحویل به: تیم توسعه و مدیر پروژه
@jalallinux
jalallinux / iran-area-achareh.json
Last active May 24, 2025 06:11
مناطق شهری ایران - آچاره
[
{
"name": "فارس - شیراز",
"url": "https://api.achareh.co/v2/regions/areas/?city=1216&limit=1000&offset=0&web=true"
},
{
"name": "تهران - تهران",
"url": "https://api.achareh.co/v2/regions/areas/?city=333&limit=1000&offset=0&web=true"
},
{
@jalallinux
jalallinux / firebase-messaging-sw.js
Created April 7, 2025 10:39
Get and Test FCM push notification
importScripts('https://www.gstatic.com/firebasejs/10.8.1/firebase-app-compat.js');
importScripts('https://www.gstatic.com/firebasejs/10.8.1/firebase-messaging-compat.js');
firebase.initializeApp({
apiKey: "__apiKey__",
authDomain: "__authDomain__",
projectId: "__projectId__",
storageBucket: "__storageBucket__",
messagingSenderId: "__messagingSenderId__",
appId: "__appId__",
@jalallinux
jalallinux / base_service.ts
Created January 11, 2025 15:24
AdonisJS BaseService
import { LucidModel, ModelAttributes, ModelQueryBuilderContract } from '@adonisjs/lucid/types/model'
import { QueryCallback } from '@adonisjs/lucid/types/querybuilder'
export abstract class BaseService<M extends LucidModel> {
protected abstract model: M
query(): ModelQueryBuilderContract<M, InstanceType<M>> {
return this.model.query()
}
@jalallinux
jalallinux / ApiBaseRepository.php
Last active July 30, 2025 06:25
l5 Repository files [andersao/l5-repository](https://github.com/andersao/l5-repository)
<?php
namespace Modules\General\Contracts\Repository;
use Illuminate\Database\Eloquent\Model;
use Prettus\Repository\Eloquent\BaseRepository as PrettusBaseRepository;
abstract class ApiBaseRepository extends PrettusBaseRepository
{
protected function applyAndReset(\Closure $callback): mixed
@jalallinux
jalallinux / Otp.php
Last active January 14, 2024 09:03
OTP class
<?php
namespace App\Contracts;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
class Otp implements Arrayable, Jsonable