Skip to content

Instantly share code, notes, and snippets.

Learning and developing

Ahmed Helal AhmedHelalAhmed

Learning and developing
View GitHub Profile
View ubuntu16.04-command-line-install-android-sdk
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jre
# install openjdk
sudo apt-get install openjdk-8-jdk
# download android sdk
View centos7 update git
yum install
yum update git
AhmedHelalAhmed /
Created Jul 11, 2018 — forked from subfuzion/
General REST API HTTP Status Codes

Reference: RFC 2616 - HTTP Status Code Definitions


  • 400 BAD REQUEST: The request was invalid or cannot be otherwise served. An accompanying error message will explain further. For security reasons, requests without authentication are considered invalid and will yield this response.
  • 401 UNAUTHORIZED: The authentication credentials are missing, or if supplied are not valid or not sufficient to access the resource.
  • 403 FORBIDDEN: The request has been refused. See the accompanying message for the specific reason (most likely for exceeding rate limit).
  • 404 NOT FOUND: The URI requested is invalid or the resource requested does not exists.
  • 406 NOT ACCEPTABLE: The request specified an invalid format.
AhmedHelalAhmed / conditional-function.php
Created Jul 14, 2018 — forked from amaelftah/conditional-function.php
extracting conditions to meaningful functions
View conditional-function.php
if (
$employee['age'] < '40'
&& $employee['medical_health'] == 'healthy'
&& $employee ['work_happits'] != 'bad'
// do somethings
AhmedHelalAhmed / ExamplePassportTest.php
Created Aug 5, 2018 — forked from archy-bold/ExamplePassportTest.php
Testing Passport Authenticated Controllers and Routes in Laravel
View ExamplePassportTest.php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ExamplePassportTest extends \PassportTestCase
use DatabaseTransactions;
AhmedHelalAhmed / PhotoApiTest.php
Created Aug 6, 2018 — forked from JeffreyWay/PhotoApiTest.php
Testing APIs in Laravel. Thoughts?
View PhotoApiTest.php
class PhotoApiTest extends TestCase {
public function setUp()
AhmedHelalAhmed / gist:d8661d1f135b2957be1744388342f2ee
Created Aug 6, 2018 — forked from damir-bubanovic/gist:d67d54b2c19aa233f51f63b3d9f0f4be
Laravel 5 - create fake data with $faker & populate database
View gist:d8661d1f135b2957be1744388342f2ee
* Faker Fileds:
* 1) Create database, model, migration
* 2) artisan make:seeder
AhmedHelalAhmed / git.migrate
Created Aug 10, 2018 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
View git.migrate
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
AhmedHelalAhmed /
Created Sep 4, 2018 — forked from leoloobeek/
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/ .
# python3 user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('{0}/gists'.format(user))
AhmedHelalAhmed / _ide_helper.php
Created Sep 6, 2018 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using
View _ide_helper.php
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
* @author Barry vd. Heuvel <>
* @see
namespace {
exit("This file should not be included, only analyzed by your IDE");