Skip to content

Instantly share code, notes, and snippets.

Learning and developing

Ahmed Helal AhmedHelalAhmed

Learning and developing
View GitHub Profile
AhmedHelalAhmed /
Created Feb 11, 2022 — forked from meigwilym/
Notes on's Laravel beyond CRUD

Laravel beyond CRUD

A blog series for PHP developers working on larger-than-average Laravel projects

Written for projects with a development lifespan of six to twelve months, with a team of three to six developers working on them simultaneously.

Chapter 1: Domain oriented Laravel

View LogAfterRequest.php
namespace App\Http\Middleware;
use Illuminate\Support\Facades\Log;
class LogAfterRequest {
public function handle($request, \Closure $next)
return $next($request);
View Basic unit-of-work for Laravel
Simple contract or interface, call as you wish:
interface UnitOfWork
public function begin();
public function commit();
public function rollback();
AhmedHelalAhmed /
Created Aug 20, 2021 — forked from wojteklu/
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.

General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

AhmedHelalAhmed /
Created Jul 2, 2021 — forked from ddeveloperr/
How to shutdown timer using Terminal/cmd on windows 10 and Linux & Mac OSX

Initial Steps

*1) Press Windows Key + R. *2) Enter CMD and press Enter.

Execute it

Write command in the cmd:

shutdown /s /t 3600

Ubuntu To Mac OS Mojave theme

Mc OS Mojave Ubuntu Look alike


  • sudo apt update
  • sudo apt install gnome-tweaks
  • sudo apt-get install gir1.2-clutter-1.0 gir1.2-clutter-gst-3.0 gir1.2-gtkclutter-1.0
AhmedHelalAhmed / es
Created Apr 14, 2021 — forked from ayubmalik/es
Bash script using Google Translate API to translate English to Spanish using curl and sed only. You can change the 'sl' and 'tl' (source/target language) query parameter to whatever you want. Optionally if you create a symlink and call it 'en' it will translate back to spanish
View es
# uncomment and fix with appropriate values if you are behind a proxy
#export https_proxy='http://localhost:3128'
tl=$(basename $0)
if [[ "${tl}" != "es" ]]; then
ua='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36'
import requests
url = ""
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer xxxxx' #add your API token
AhmedHelalAhmed /
Created Jul 25, 2020 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


AhmedHelalAhmed / AppServiceProvider.php
Created Jun 12, 2020 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
View AppServiceProvider.php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
public function boot()