Skip to content

Instantly share code, notes, and snippets.

CEO of my life, CTO of my localhost, co-founder of my son

Mohamed Hafez Abdallah mohamedhafezqo

CEO of my life, CTO of my localhost, co-founder of my son
Block or report user

Report or block mohamedhafezqo

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
mohamedhafezqo /
Created Jul 10, 2019
How to install to dustin10/VichUploaderBundle


Get the bundle using composer

Add VichUploaderBundle by running this command from the terminal at the root of your Symfony project:

composer require vich/uploader-bundle
mohamedhafezqo / example.php
Last active Mar 4, 2019
GraphQL Client For PHP Using Guzzle
View example.php
$endPoint = '';
$query = <<<'GRAPHQL'
query getUsers {
user {
mohamedhafezqo /
Created Oct 1, 2018 — forked from jbub/
git squash last two commits into one
git rebase --interactive HEAD~2
# we are going to squash c into b
pick b76d157 b
pick a931ac7 c
# squash c into b
pick b76d157 b
s a931ac7 c
mohamedhafezqo /
Last active Sep 2, 2018
Refactoring Legacy Code

Comments Code Smell

  • Remove unnecessary comments.
  • If the code is obvious, don’t write a comment.
  • Don’t leave commented old code.
  • Remove commented debugging var_dump, dump, echo, ..etc.

Best Practices:

mohamedhafezqo /
Last active Feb 22, 2019
My Simply Git Aliases That Make Me Breakthrough

Git Aliases

git config --global checkout

git config --global alias.ct commit

git config --global status

git config --global pull

View CreditStatus.php
namespace ACM\Bundle\CreditBundle\Constant;
final class CreditStatus implements IConstant
const PENDING = 1;
const PENDING_LABEL = 'Pending';
const SUCCESS = 2;
You can’t perform that action at this time.