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 / templates
Last active February 20, 2022 00:43
templates
https://startbootstrap.com
https://templatemo.com
https://www.free-css.com
https://nicepage.com/css-templates
https://templated.co
https://designseer.com/free-photoshop-psd-website-templates
https://colorlib.com
https://www.behance.net
https://github.com/toidicode/template
https://github.toidicode.com
# https://www.hackerrank.com/challenges/japanese-cities-attributes/submissions
select * from city where countrycode="jpn";
@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
@AhmedHelalAhmed
AhmedHelalAhmed / git_remove_branches.txt
Last active February 11, 2021 00:00
The simpler way to delete all branches but keeping others like "release" and "master"
git branch | grep -v "release" | grep -v "master" | xargs git branch -D
@AhmedHelalAhmed
AhmedHelalAhmed / AppServiceProvider.php
Last active September 24, 2021 03:50
laravel-queries.log
<?php
namespace App\Providers;
use DB;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@AhmedHelalAhmed
AhmedHelalAhmed / promises.js
Last active January 2, 2021 19:09
JS chain promises
//======> output: 1 2 3 4
// synchronous - ملتزم بالترتيب
// JavaScript is always synchronous
function step1() {
return new Promise((resolve, reject) => {
console.log("1");
resolve(1);
});
}