Note: I advice you to write every thursday (at the end of the workday week)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function shouldHaveReceivedAction(string $action) | |
{ | |
$original = $this->app->make($action); | |
$this->mock($original) | |
->shouldReceive('handle') | |
->atLeast()->once() | |
->andReturnUsing(fn (...$args) => $original->handle(...$args)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Facades\Schema; | |
return new class extends Migration | |
{ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function memoize($target) { | |
static $memo = new WeakMap; | |
return new class ($target, $memo) { | |
function __construct( | |
protected $target, | |
protected &$memo, | |
) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deployment | |
run-name: Deployment | |
on: | |
push: | |
branches: | |
- 'master' # انا مهتم بالرفع فقط عند دمج أي شيء على الفرع الرئيسي | |
jobs: | |
stage: | |
runs-on: ubuntu-latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding=utf-8 -*- | |
""" | |
An example of cleaning arabic text with PyArbic Library | |
Requirements: pip install pyarabic | |
Data: text file | |
Ouput: text file ( cleaned) | |
""" | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div | |
class="relative pointer-events-none" | |
x-data="{ active: 0 }" | |
x-init="setInterval(() => | |
active = ++active > $el.childElementCount - 1 ? 0 : active | |
, 3000)" | |
> | |
@foreach([ | |
'hero-pic1.webp', | |
'hero-pic2.webp', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Arr; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Database\Eloquent\Relations\HasMany; | |
class AppServiceProvider extends ServiceProvider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// طريقة التشغيل من موقعي على الرابط التالي: blog.abdelhadi.org | |
// ==UserScript== | |
// @name LinkedIn Learning ترجمة لينكدإن ليرننج | |
// @description LinkedIn Learning ترجمة دورات لينكدإن ليرننج إلى اللغة العربية | |
// @namespace https://github.com/journey-ad | |
// @version 0.2.1 | |
// @icon https://static.licdn.cn/sc/h/2c0s1jfqrqv9hg4v0a7zm89oa | |
// @author journey-ad | |
// @match *://www.linkedin.com/learning/* | |
// @require https://greasyfork.org/scripts/411512-gm-createmenu/code/GM_createMenu.js?version=864854 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to your .env.example and .env files | |
CSP_ENABLED=true | |
CSP_REPORT_ONLY=true |
NewerOlder