Skip to content

Instantly share code, notes, and snippets.

View ahmed-bhs's full-sized avatar
👽

Ahmed EBEN HASSINE 脳の流れ ahmed-bhs

👽
View GitHub Profile
@ahmed-bhs
ahmed-bhs / zsh.md
Last active April 23, 2018 21:29 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@ahmed-bhs
ahmed-bhs / transaction.php
Created April 13, 2018 21:09 — forked from KaduNovoK/transaction.php
Transactions in Symfony 2 and Doctrine 2
<?php
// Code sample to use Transactions
// Get the Entity Manager
$em = $this->getDoctrine()->getEntityManager();
// Suspend the auto-commit
$em->getConnection()->beginTransaction();
@ahmed-bhs
ahmed-bhs / gist:6a4ad11acc2dc9d0679f818181364192
Created March 25, 2018 17:05 — forked from tlrobinson/gist:1073865
Autocomplete Makefile targets. Add this to your shell config file.
complete -W "\`grep -oE '^[a-zA-Z0-9_-]+:([^=]|$)' Makefile | sed 's/[^a-zA-Z0-9_-]*$//'\`" make
@ahmed-bhs
ahmed-bhs / AppKernel.php
Created November 5, 2017 21:41 — forked from kbond/AppKernel.php
JWT Authentication With Symfony Guard. POST username/password to /login to receive token, /api* requests require a valid token
<?php
// app/AppKernel.php
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
public function registerBundles()
{