Skip to content

Instantly share code, notes, and snippets.

View aitboudad's full-sized avatar
🏠
Working from home

Abdellatif Ait boudad aitboudad

🏠
Working from home
View GitHub Profile
@btroncone
btroncone / ngrxintro.md
Last active November 5, 2024 12:20
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@kbond
kbond / AppKernel.php
Last active August 6, 2024 09:05
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()
{
@weaverryan
weaverryan / README.md
Last active April 28, 2020 14:07
Symfony Core Meeting Logs
Date Topics URL Summary
May 21st, 2015 core team organization, issue tagging/organization, PSR-7 logs --
June 4th, 2015 PSR-HttpFoundation, DI-PSR, issue triaging/organization, meeting organization logs --
June 18th, 2015 workflow/notifications, removing forums/ML, 3.0 changes - templating logs --
July 2nd, 2015 issues bot / HttpFoundation PSR-7 / dropping templating / new SE structure/ config component split / HttpKernel split logs summary
July 16th, 2015 issues bot / updates on initiatives / closing old issues logs --
July 30th, 2015 deprecatio
@mickaelandrieu
mickaelandrieu / upgrade2.3-to-2.7.md
Last active May 21, 2024 03:39
Complete migration guide from Symfony 2.3 LTS to Symfony 2.7 LTS

From Symfony 2.3 to Symfony 2.7: the complete guide

Objectives

  • assume your code doesn't use any deprecated from versions below Symfony 2.3
  • update dependencies from 2.3 to 2.7
  • do not support "deprecated", be "Symfony3-ready"
  • list tasks component by component, bundle by bundle.
@jwage
jwage / .php_cs
Last active September 5, 2024 00:20
php-cs-fixer git pre commit hook
<?php
return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'short_array_syntax',
'ordered_use',
])
;
@dbu
dbu / README.md
Last active August 29, 2015 14:07
Cached user provider

A user provider reading users from the filesystem.

This is useful when you have an API with just a few different users (different frontends, not end users). Our data comes from elasticsearch for most API calls, so we don't want to block all access just because MySQL has gone away.

As we have a multi server setup, we have a cronjob to trigger the UserProvider::dumpUsers method regularly.

@mrkrstphr
mrkrstphr / README.md
Last active February 5, 2019 13:17
Deploying Sculpin Sites to GitHub Pages

Deploying Sculpin Sites to GitHub Pages

I wanted to be able to use Sculpin to generate GitHub pages. Here's what I did...

  1. Created a super awesome Sculpin site from the Sculpin Blog Skeleton

  2. Make sure everything is under version control in my master branch (except things that shouldn't be. see the .gitignore)

  3. Updated publish.sh:

#!/bin/bash

@jakzal
jakzal / HttpFacade.php
Last active August 29, 2015 14:00
Controller as a listener
<?php
use Symfony\Component\HttpFoundation\RequestStack;
class HttpFacade
{
/**
* @var RequestStack
*/
private $requestStack;
<?php
mb_internal_encoding("UTF-8");
function λ($fn) {
list($args, $body) = explode('=>', $fn, 2);
$args = trim($args);
$args = ltrim($args, '(');
$args = rtrim($args, ')');
@pedroborges
pedroborges / phpspec_cheatsheet.md
Last active April 23, 2016 09:27
From Marcello Duarte's PhpSpec 2.0 ilustrated by examples slides (http://pt.slideshare.net/marcello.duarte/phpspec-20-ilustrated-by-examples)

PhpSpec 2.0 Cheat Sheet

Object: $result ($this)

Expectation: should or shouldNot

Matcher: Be...()

Types of Matchers: