Skip to content

Instantly share code, notes, and snippets.

View A909M's full-sized avatar
:electron:

Assem Alwaseai A909M

:electron:
View GitHub Profile
@joshcirre
joshcirre / keymap.json
Last active January 22, 2026 03:19
My Zed settings as a Laravel developer.
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
{
"context": "Workspace",
@iamdadmin
iamdadmin / AppBootServiceProvider.php
Last active March 8, 2025 20:03
Simple, if somewhat wasteful, automatic page refresh for Filament under Frankenphp
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Route;
use Filament\Support\Facades\FilamentView;
use Filament\View\PanelsRenderHook;
use Symfony\Component\HttpFoundation\StreamedResponse;
@A909M
A909M / filament-hiding-records-in-table-until-filtered-or-searched.php
Last active May 2, 2025 17:02
If you have too many records in a single table to show immediately, you can hide them until a filter/search is applied.
->modifyQueryUsing(function (Builder $query, $livewire) {
$hasFilters = collect($livewire->tableFilters)
->filter(fn($filter) => !empty($filter['values']))
->isNotEmpty();
return ($livewire->hasTableSearch() || $hasFilters) ? $query : $query->whereRaw('1 = 0');
})
@CodeWithDennis
CodeWithDennis / HasActiveIcon.php
Created December 13, 2024 09:22
Solid Navigation Icon - FilamentPHP - Resource
<?php
namespace App\Traits;
trait HasActiveIcon
{
public static function getActiveNavigationIcon(): ?string
{
return str(self::getNavigationIcon())
->replace('heroicon-o-', 'heroicon-s-')
@A909M
A909M / SearchTranslatableField.php
Created October 25, 2024 13:37
This trait provides a search scope for models with JSON fields containing Arabic text, adding support for common Arabic character variations (like 'ู‡' vs. 'ุฉ') to improve search accuracy. Usage:
<?php
namespace App\Traits;
use Illuminate\Database\Eloquent\Builder;
trait SearchTranslatableField
{
public function scopeSearchByTranslatableField(Builder $query, string $value, string $field = 'name'): Builder
{
@AskinNet
AskinNet / kitty.md
Created May 10, 2024 07:29 — forked from pnsinha/kitty.md
Kitty CheatSheet

Default shortcuts

Scrolling

Action Shortcut
Scroll line up ctrl+shift+up (also โŒฅ+โŒ˜+โ‡ž and โŒ˜+โ†‘ on macOS)
Scroll line down ctrl+shift+down (also โŒฅ+โŒ˜+โ‡Ÿ and โŒ˜+โ†“ on macOS)
Scroll page up ctrl+shift+page_up (also โŒ˜+โ‡ž on macOS)
Scroll page down ctrl+shift+page_down (also โŒ˜+โ‡Ÿ on macOS)
@pj8912
pj8912 / private_github_cpanel.md
Created August 27, 2023 13:54
Connect PRIVATE GITHUB repository to CPANEL hosting account

Connect PRIVATE GITHUB repository to CPANEL hosting account

27/08/2023


Cpanel

  • Go to terminal of your cpanel account and type the command below to generate ecdsa key pair
ssh-keygen -t ecdsa -b 251 -c "EMAIL_ADDRESS"
@theinvensi
theinvensi / pagedjs-repeat-table-header.js
Last active August 9, 2025 07:49
pagedjs-repeat-table-header
class RepeatTableHeadersHandler extends Paged.Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller)
this.splitTablesRefs = []
}
afterPageLayout(pageElement, page, breakToken, chunker) {
this.chunker = chunker
this.splitTablesRefs = []
@sumonst21
sumonst21 / index.html
Created August 30, 2021 00:20
Select Field with Search - AlpineJs + Tailwind
<div class="flex flex-col items-center">
<div class="w-full md:w-1/2 flex flex-col items-center h-64">
<div class="w-full px-4">
<div x-data="selectConfigs()" x-init="fetchOptions()" class="flex flex-col items-center relative">
<div class="w-full">
<div @click.away="close()" class="my-2 p-1 bg-white flex border border-gray-200 rounded">
<input
x-model="filter"
x-transition:leave="transition ease-in duration-100"
x-transition:leave-start="opacity-100"
@Waseem-Almoliky
Waseem-Almoliky / Yemeni phone number regex.md
Last active December 7, 2025 14:14
yemeni phone numbers regex

ุงู„ุณู„ุงู… ุนู„ูŠูƒู… ูˆุฑุญู…ุฉ ุงู„ู„ู‡ ูˆุจุฑูƒุงุชู‡ ุŒ ู‡ุฐุง ูƒูˆุฏ ุฑูŠุฌูŠูƒุณ ู„ู„ุชุญู‚ู‚ ู…ู† ุตุญุฉ ุฃุฑู‚ุงู… ุงู„ุฌูˆุงู„ุงุช ุงู„ูŠู…ู†ูŠุฉ ุŒ ูŠู‚ูˆู… ุงู„ุฑูŠุฌูŠูƒุณ ุจุงู„ุชุญู‚ู‚ ู…ู† ู…ูุชุงุญ ุงู„ุฏูˆู„ุฉ ุŒ ู…ูุชุงุญ ุดุฑูƒุงุช ุงู„ุฅุชุตุงู„ุงุช ูˆุงู„ุฎุทูˆุท ุงู„ุงุฑุถูŠุฉ ู„ุถู…ุงู† ุตุญุฉ ุงู„ู†ุต ุงู„ู…ุฏุฎู„ .

yemeni phone number regex

Hello

this is a regex code to validate yemeni phone number for private companies and ground lines almost everything :) hope you found it useful.

/^(((\+|00)9677|0?7)[01378]\d{7}|((\+|00)967|0)[1-7]\d{6})$/