Skip to content

Instantly share code, notes, and snippets.

tattali

Block or report user

Report or block tattali

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
@tattali
tattali / Api Platform + GraphQL + Apollo + TypeScript.md
Created May 9, 2020
Api Platform + GraphQL + Apollo + TypeScript
View Api Platform + GraphQL + Apollo + TypeScript.md

Api Platform + GraphQL + Apollo + TypeScript

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

Install Api Platform

composer req api

Install GraphQL

@tattali
tattali / Create or Get UTM Cookies with Symfony.md
Last active May 24, 2020
Create or Get UTM Cookies with Symfony
View Create or Get UTM Cookies with Symfony.md

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+

Installation

Download tattali/utm-cookie-bundle using composer

@tattali
tattali / react-context.md
Last active Apr 15, 2020
How to share data between components with react context
View react-context.md

React Context as a store

TYPESCRIPT | useState

Context configuration

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

export interface IStore {
  props1: string;
@tattali
tattali / Use fullcalendar.js library in your Symfony project with doctrine.md
Last active May 13, 2020
Use fullcalendar.js library in your Symfony project with doctrine
View Use fullcalendar.js library in your Symfony project with doctrine.md

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.

Installation

Download tattali/CalendarBundle using composer

$ composer require tattali/calendar-bundle
@tattali
tattali / bootstrap-4-nav-collapse.md
Last active Jun 13, 2018
Bootstrap 4 nav collapse
View bootstrap-4-nav-collapse.md

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>
    </ul>
  </li>
View sf4 crud best practices.md

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
View sf4 install.md

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

View Configurer un VPS OVH et mettre en production un projet Symfony 4.md

Mettre en production un projet Symfony 4 sur un VPS OVH

VPS OVH | Ubuntu 16.04.3 LTS | LAMP | SYMFONY 4

Pré-requis

  • 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

View gist:c29c943d3177cfc7f3fb16ab297fa95a

Mac OS X

Icons trouble

sudo rm -rfv /Library/Caches/com.apple.iconservices.store; sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder
@tattali
tattali / config_perso.md
Last active Jun 11, 2018
macOS Sierra config
View config_perso.md

CONFIG

Shortcuts

Delete all files named ".DS_Store" in current directory and subdirectories

$ find . -name ".DS_Store" -delete
You can’t perform that action at this time.