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 / Ip.txt
Created September 20, 2018 12:08
Get the ip address without any extra information.
hostname -I
@AhmedHelalAhmed
AhmedHelalAhmed / great website to share photos.txt
Created September 20, 2018 13:14
great website to share photos
https://prnt.sc
@AhmedHelalAhmed
AhmedHelalAhmed / simple share vuejs code.txt
Created September 20, 2018 13:14
simple share vuejs code
https://jsfiddle.net/ahmedhelalahmed/6nqfhkt5/
@AhmedHelalAhmed
AhmedHelalAhmed / make copy of previous project laravel.txt
Created September 23, 2018 11:29
Important note make copy of previous project laravel
recall that:
https://laravel-news.com/config-caching
commands to do:
php artisan config:clear

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@AhmedHelalAhmed
AhmedHelalAhmed / info for server.php
Created September 29, 2018 01:09
info for server
<?php
$length_array = array();
var_dump($_SERVER);
foreach ($_SERVER as $key => $value)
{
$length = strlen($value);
$length_array[$key] = $length;
echo '<pre>';
print_r($key . " = " . $length . " characters");
## How to install mcrypt in php7.2
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
##
#
# Check version php and pecl
#
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php
@AhmedHelalAhmed
AhmedHelalAhmed / debugging the code.txt
Created October 4, 2018 07:35
debugging the code
//PHP - laravel
return Response::json(['data'=>'test'], 400);
abort(500, 'dd helal');
dd(' dd ',' helal ');
abort(500, 'dd helal ',);
@AhmedHelalAhmed
AhmedHelalAhmed / script to get certain value from array of objects.js
Last active October 22, 2018 15:05
script to get certain value from array of objects
const inputs=[
{
macAddress: 'A',
flag: false,
},
{
macAddress: 'B',
flag: false,
@AhmedHelalAhmed
AhmedHelalAhmed / validate input is text not space in js.js
Created November 6, 2018 09:54
validate input is text not space in js
if (!input.replace(/\s/g, '').length)
{
// code
}
if (!input)
{
// code
}