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 / 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 / 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);
}
Simple contract or interface, call as you wish:
interface UnitOfWork
{
public function begin();
public function commit();
public function rollback();
}
@AhmedHelalAhmed
AhmedHelalAhmed / clean_code.md
Created August 20, 2021 00:12 — forked from wojteklu/clean_code.md
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
AhmedHelalAhmed / shutdown_timer.md
Created July 2, 2021 02:01 — forked from ddeveloperr/shutdown_timer.md
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


Pre-requisites

  • 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
AhmedHelalAhmed / es
Created April 14, 2021 16:03 — 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
#!/bin/bash
# uncomment and fix with appropriate values if you are behind a proxy
#export https_proxy='http://localhost:3128'
sl=en
tl=$(basename $0)
if [[ "${tl}" != "es" ]]; then
sl=es
fi
base_url="https://translate.googleapis.com/translate_a/single?client=gtx&sl=${sl}&tl=${tl}&dt=t&q="
ua='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36'
#!/usr/bin/python3
import requests
url = "http://127.0.0.1:8000/api/test"
payload={}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer xxxxx' #add your API token