Skip to content

Instantly share code, notes, and snippets.

📱
Learning and developing

Ahmed Helal AhmedHelalAhmed

📱
Learning and developing
Block or report user

Report or block AhmedHelalAhmed

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AhmedHelalAhmed
AhmedHelalAhmed / Setup a Virtual Host in Windows with XAMPP Server.txt
Created Jul 7, 2019
Setup a Virtual Host in Windows with XAMPP Server
View Setup a Virtual Host in Windows with XAMPP Server.txt
steps:
https://ultimatefosters.com/hosting/setup-a-virtual-host-in-windows-with-xampp-server/
sample of required code
```
<VirtualHost *:80>
ServerAdmin webmaster@localhost.com
DocumentRoot "D:\projects\cloudsystem\public"
ServerName falconvizcloud.test
View Laravel-commands.txt
php artisan config:cache
php artisan route:cache
php artisan config:clear
php artisan route:clear
php artisan view:clear
php artisan clear-compiled
composer dump-autoload
php artisan optimize
View PostPolicy.php
<?php
namespace App\Policies;
use App\Models\User;
use App\Post;
use Illuminate\Auth\Access\HandlesAuthorization;
class PostPolicy
{
@AhmedHelalAhmed
AhmedHelalAhmed / Cors.php
Created Mar 31, 2019 — forked from drewjoh/Cors.php
Laravel CORS Middleware
View Cors.php
<?php // /app/Http/Middleware/Cors.php
namespace App\Http\Middleware;
use Closure;
class Cors {
public function handle($request, Closure $next)
{
return $next($request)
View s3 and laravel.txt
S3
simple research:
https://artisansweb.net/upload-file-s3-using-laravel-filesystem/
https://mattstauffer.com/blog/laravel-5.0-cloud-file-drivers/
https://itsolutionstuff.com/post/laravel-5-amazon-s3-file-upload-tutorial-part-1example.html
https://www.youtube.com/watch?v=BK_hhyBJxuU
https://chrisblackwell.me/upload-files-to-aws-s3-using-laravel/
https://www.youtube.com/watch?v=nMDIVQsESBY&lc=UgxINeYXcc618oxgy-14AaABAg
@AhmedHelalAhmed
AhmedHelalAhmed / phonePrefixCodesWithCountry.php
Created Mar 19, 2019 — forked from grexlort/phonePrefixCodesWithCountry.php
List of phone prefix codes with country in PHP array format prefix => country +xxx
View phonePrefixCodesWithCountry.php
// data from https://gist.github.com/andyj/7108917
$array = [
'44' => 'UK (+44)',
'1' => 'USA (+1)',
'213' => 'Algeria (+213)',
'376' => 'Andorra (+376)',
'244' => 'Angola (+244)',
'1264' => 'Anguilla (+1264)',
'1268' => 'Antigua & Barbuda (+1268)',
@AhmedHelalAhmed
AhmedHelalAhmed / countries.php
Created Mar 19, 2019 — forked from josephilipraja/countries.php
List of Countries with Country code & Telephone (Dial) Code as a PHP Array. Bonus: PHP function to list all Countries as HTML Select Tag Options with their 2 character Country code as values
View countries.php
<?php
$countryArray = array(
'AD'=>array('name'=>'ANDORRA','code'=>'376'),
'AE'=>array('name'=>'UNITED ARAB EMIRATES','code'=>'971'),
'AF'=>array('name'=>'AFGHANISTAN','code'=>'93'),
'AG'=>array('name'=>'ANTIGUA AND BARBUDA','code'=>'1268'),
'AI'=>array('name'=>'ANGUILLA','code'=>'1264'),
'AL'=>array('name'=>'ALBANIA','code'=>'355'),
'AM'=>array('name'=>'ARMENIA','code'=>'374'),
'AN'=>array('name'=>'NETHERLANDS ANTILLES','code'=>'599'),
@AhmedHelalAhmed
AhmedHelalAhmed / PHP Countries Array
Created Mar 19, 2019 — forked from DHS/PHP Countries Array
PHP array of all country names
View PHP Countries Array
<?php
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island
@AhmedHelalAhmed
AhmedHelalAhmed / !NOTE.md
Created Mar 17, 2019 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
View !NOTE.md
@AhmedHelalAhmed
AhmedHelalAhmed / contactus.php
Last active Feb 25, 2019
contact us script
View contactus.php
<?php
$conn = mysqli_connect('localhost', 'root', 'password','contact table') or die("error in connection");
$fullname=$_post['fullname'];
$phone=$_POST['phone'];
$country=$_POST['country'];
$email=$_POST['email'];
$message=$_POST['message'];
$sql = "INSERT INTO contact (full_name,phone,country,email,message)
VALUES ('$fullname','$phone','$country','$email','$message')";
$conn->query($sql) or die(mysqli_error($conn));
You can’t perform that action at this time.