Skip to content

Instantly share code, notes, and snippets.

tattali / GeoIP2
Created January 29, 2023 16:37
Easy install of GeoIP2 with Symfony
tattali / Api Platform + GraphQL + Apollo +
Last active January 2, 2022 16:43
Api Platform + GraphQL + Apollo + TypeScript

Api Platform + GraphQL + Apollo + TypeScript

Symfony | Api Platform | GraphQL | Apollo | TypeScript | React Hooks


Install Api Platform

composer req api
tattali / Create or Get UTM Cookies with
Last active May 24, 2020 08:06
Create or Get UTM Cookies with Symfony

Create or Get UTM Cookies with Symfony

The UtmCookieBundle allow you to save utm parameters from url into a cookie. It's also provide a bunch of tools to easily retrive all or each utm.

  • Work with any flex Symfony projects 3.4+ to 5.0+
  • PHP v7.1+


Download tattali/utm-cookie-bundle using composer

tattali /
Last active July 12, 2022 08:29
How to share data between components with react context

React Context as a store


Context configuration

// src/services/context/StoreContext.tsx
import React, { createContext, Dispatch, PropsWithChildren, SetStateAction, useState } from "react";

export interface IStore {
  props1: string;
tattali / Use fullcalendar.js library in your Symfony project with
Last active August 5, 2023 10:53
Use fullcalendar.js library in your Symfony project with doctrine

Use fullcalendar.js library in your Symfony 4 project with doctrine

FullCalendar.js is a JavaScript event calendar customizable and open source. You can display a full-size event calendar that also compatible with google calendar.


Download tattali/CalendarBundle using composer

$ composer require tattali/calendar-bundle
tattali /
Last active June 13, 2018 10:01
Bootstrap 4 nav collapse

No theme

<ul id="accordionExample">
  <li data-toggle="collapse" data-target="#collapseOne">
    Lvl 1
    <ul id="collapseOne" class="collapse show" data-parent="#accordionExample">
      <li>Lvl 1.1</li>
      <li>Lvl 1.2</li>

Symfony 4 CRUD best practices

Step by step

Two shots CRUD packages installation

composer require --dev sec-checker profiler server
composer require annotations twig asset translator form doctrine validator

Symfony 4

Framework download and install

Install Symfony 4 skeleton

composer create-project symfony/skeleton my-project && cd my-project

Use git to versionize your project

Mettre en production un projet Symfony 4 sur un VPS OVH

VPS OVH | Ubuntu 16.04.3 LTS | LAMP | SYMFONY 4


  • Votre projet doit être versionné avec git et hébergé (Github, Bitbucket...).
  • Vous devez avoir acheté un VPS et un nom de domaine.
  • Vous devez également générer une clé SSH sur votre ordinateur. (explications ci-dessous)

Création et ajout de la clé SSH au profil OVH

Mac OS X

Icons trouble

sudo rm -rfv /Library/Caches/; sudo find /private/var/folders/ \( -name -or -name \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder