Skip to content

Instantly share code, notes, and snippets.

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

Florence LG Florencelg

🏠
Working from home
View GitHub Profile
@Florencelg
Florencelg / gist:58d3a0d267811a537b6e41c4fd8aec63
Last active November 8, 2018 08:05
1 - Symfony : Introduction à Symfony 4
1 - Quelle est la société qui développe Symfony ?
SensioLabs
2 - Cite les autres produits développés par cette société ?
- Blackfire.IO
- Composer
- Twig
- Doctrine
les autres produits développés sont:
- Blackfire.IO
@Florencelg
Florencelg / index.php
Created October 23, 2018 12:15
Quête php: laisse pas traîner ton File
<! Doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Multiple File Upload</title>
</head>
<body>
@Florencelg
Florencelg / hello-wilder.js
Created October 15, 2018 11:59
Quête Base de Java Script- Découverte du langage
const movie = 'Avatar';
const year = '2009';
const director = 'James Cameron';
const message = movie + ' ,réalisé par ' + director + ' ,est sorti en ' + year;
alert(message);
@Florencelg
Florencelg / les expressions régulières
Last active October 15, 2018 12:15
Quête Regex: les expressions régulières
/\b([A-Z])+\./gi permet de rechercher A.
/[0-9]{2}\/[0-9]{2}\/[0-9]{4}/ permet de rechercher 31/03/1999
/\b[0-9]\/[0-9]{2}\b/ permet de rechercher seulement 9/10
/[a-zA-Z]{14}/ permet de rechercher 14 caratères qui est Nebuchadnezzar
/\b[a-z]{5}\:\/\/[a-z]{3}\.[a-z]{4}\.[a-z]{3}\/[a-z]{5}\/\w{9}\b/ permet de rechercher https://www.imdb.com/title/tt0133093
@Florencelg
Florencelg / 03 Base de données partie 2
Created October 1, 2018 12:36
florence_g_wcs_orleans
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -----------------------------------------------------
-- -----------------------------------------------------
@Florencelg
Florencelg / Personnage.php
Created September 27, 2018 08:56
Introduction PHP orientation Objet
<?php
class Personnage{
private $firstName;
private $lastName;
private $adresse;
private $dateTime;
public function __construct(string $firstName, string $lastName, string $adresse)
@Florencelg
Florencelg / florence_g_wcs_orleans.sql
Created September 21, 2018 07:08
02-Base de données grâce au langage SQL
-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
--
-- Host: localhost Database: florence_g_wcs_orleans
-- ------------------------------------------------------
-- Server version 5.7.23-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@Florencelg
Florencelg / index.php
Last active September 18, 2018 14:52
Les formulaires en PHP
<?php
if($_POST)
{
//not empty
//atleast 6 characters long
$errors = array();
//start validation
if(empty($_POST['firstName']))
{
@Florencelg
Florencelg / index.php
Created September 16, 2018 15:46
Les fonctions avec PHP
<?php
$animal= ['singe', 'loup'];
$chose = [' à la lune', 'au feux'];
function writeSecretSentence($parametre_1,$parametre_2)
{
return $parametre_1." s'incline face ".$parametre_2;
}
echo writeSecretSentence($animal[0],$chose[1]);
?>
@Florencelg
Florencelg / conditions PHP
Created September 15, 2018 16:09
PHP procédural - Les conditions
<?php
$weapons = ['fists', 'whip', 'gun'];
$opponentWeapon = $weapons[rand(0,2)]; // Cela permet de choisir une arme de manière aléatoire.
$indyWeapon = $weapons;
if ($opponentWeapon == $weapons[0]){
$indyWeapon = $weapons [2];
}elseif ($opponentWeapon == $weapons [1]){
$indyWeapon = $weapons [0];
}else{