Skip to content

Instantly share code, notes, and snippets.

View AhmedHelalAhmed's full-sized avatar
📱
Learning and developing

Ahmed Helal AhmedHelalAhmed

📱
Learning and developing
View GitHub Profile
@AhmedHelalAhmed
AhmedHelalAhmed / SQL Queries in Laravel.php
Created September 25, 2024 11:43
Quickly View SQL Queries in Laravel with DB::listen (No Debugbar)
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Events\QueryExecuted;
DB::listen(function (QueryExecuted $query) use (&$count) {
$count++;
$bindings = collect($query->bindings)
->map(function ($param) {
if (is_numeric($param)) {
@AhmedHelalAhmed
AhmedHelalAhmed / AutoConnectLinkedIn.js
Last active February 6, 2023 22:43 — forked from thealphadollar/AutoConnectLinkedIn.js
JS script to send connection requests to your LinkedIn search results with customisation options, accept all received connection requests, and withdraw pending sent connection requests.
// If the script does not work, you may need to allow same site scripting https://stackoverflow.com/a/50902950
Linkedin = {
config: {
scrollDelay: 3000,
actionDelay: 5000,
nextPageDelay: 5000,
// set to -1 for no limit
maxRequests: -1,
totalRequestsSent: 0,
const https = require('https');
/*
* Complete the function below.
* Use console.log to print the result, you should not return from the function.
*/
function getMovieTitles(substr) {
if (substr === '')
return ''
@AhmedHelalAhmed
AhmedHelalAhmed / laravel open source projects.txt
Last active May 17, 2023 20:22
laravel open source projects
https://github.com/AhmedHelalAhmed/urlhub
https://github.com/AhmedHelalAhmed/academico
https://github.com/AhmedHelalAhmed/DaybydayCRM
https://github.com/AhmedHelalAhmed/laerx
https://github.com/AhmedHelalAhmed/larastreamers
https://github.com/AhmedHelalAhmed/freek.dev
https://github.com/AhmedHelalAhmed/crater
https://github.com/AhmedHelalAhmed/koel
https://github.com/AhmedHelalAhmed/akaunting
https://github.com/AhmedHelalAhmed/portal
@AhmedHelalAhmed
AhmedHelalAhmed / fix.bash
Last active September 13, 2022 19:15
strange-arabic-words.txt
#!/bin/bash
file="result.txt"
while read -r line; do
#echo -e "$line\n"
iconv -fwindows-1256 -tutf8 "$line" > "$line"'_fixed'
done <$file
function createUser(email, password) {
validateInput(email, password);
saveUser(email, password);
}
function isNotValid(email, password) {
return emailNotValid(email) || passwordNotValid(password);
}
@AhmedHelalAhmed
AhmedHelalAhmed / fb-likes-issue.js
Last active February 26, 2022 01:10
fb-likes-issue
// ==UserScript==
// @name Unlike Facebook Pages
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Unlike all Facebook pages
// @author Ahmed Helal Ahmed
// @match https://duckduckgo.com/?q=new+script+unlike+pages+facebook&ia=web
// @icon https://www.google.com/s2/favicons?sz=64&domain=duckduckgo.com
// @grant none
// ==/UserScript==
@AhmedHelalAhmed
AhmedHelalAhmed / index.md
Created February 11, 2022 14:54 — forked from meigwilym/index.md
Notes on stitcher.io's Laravel beyond CRUD

Laravel beyond CRUD

stitcher.io

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

namespace App\Http\Middleware;
use Illuminate\Support\Facades\Log;
class LogAfterRequest {
public function handle($request, \Closure $next)
{
return $next($request);
}
@AhmedHelalAhmed
AhmedHelalAhmed / README.md
Last active November 1, 2021 21:47
log notification
  • Make new file in /usr/local/bin with name log add its content from the file with name log
  • Add execution ability to it by: sudo chmod +x log
  • Add the song file with name new_log.mp3 in /usr/local/bin
  • Open terminal in for example laravel project(example-app): log /var/www/html/example-app/storage/logs/laravel.log