Skip to content

Instantly share code, notes, and snippets.

View beaver64's full-sized avatar

Florent Bellenger beaver64

View GitHub Profile
@beaver64
beaver64 / Wizard
Created May 28, 2020 09:55
SQL_Quest_2
MariaDB [wild_db_quest]> SELECT * FROM wizard WHERE birthday BETWEEN '1975-01-01' AND '1985-12-31';
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| id | firstname | lastname | birthday | birth_place | biography | is_muggle |
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| 1 | harry | potter | 1980-07-31 | london | | 0 |
| 2 | hermione | granger | 1979-09-19 | | Friend of Harry Potter | 0 |
| 4 | ron | weasley | 1980-03-01 | | Best friend of Harry | 0 |
| 5 | ginny | weasley | 1981-08-11 | | Sister of Ron and girlfriend of Harry | 0 |
| 6 | fred | weasley | 1978-04-01 | | | 0 |
| 7 | george | weasley | 1978-04-01 |
@beaver64
beaver64 / Form.php
Last active May 28, 2020 08:31
questformulary_securisation
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Formulaires</title>
</head>
<body>
<h1>Formulaire de demande d'informations</h1>
<h2>Veuillez remplir les renseignements demandés ci-dessous avec un maximum de précision merci</h2>
<form method="post" action="thanks.php">
@beaver64
beaver64 / index.php
Created May 27, 2020 15:27
livecoding_Php_Forms
<?php
/*
Groupe 1 : fabien, florent, laurent j, Yoan, Cyril
Groupe 1
-------
Réaliser un formulaire avec d'inscription avec placeholder et vérification des champs côté front, comportant :
- 1 champ name
mb-air$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 8.0.20 MySQL Community Server - GPL
--
mysql> CREATE DATABASE kaamelott
-> ;
Query OK, 1 row affected (0,01 sec)
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Formulaires</title>
</head>
<body>
<form action="/thanks.php" method="post">
<div>
<label for="nom">Nom :</label>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Formulaires</title>
</head>
<body>
<form action="thanks.php" method="post">
<div>
<label for="nom">Nom :</label>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Formulaires</title>
</head>
<body>
<form action="thanks.php" method="post">
<div>
<label for="nom">Nom :</label>
<?php
$animal = "Le pangolin";
$item = "la Planète";
function writeSecretSentence(string $animal ,string $item) : string
{
return "$animal s'incline face à $item.";
}
$writeSecretSentence = writeSecretSentence($animal ,$item);
echo $writeSecretSentence;
@beaver64
beaver64 / fists_whip_gun.php
Last active May 14, 2020 13:49
rock Paper Scissors with indy
<?php
$weapons = ["fists", "whip", "gun"];
$opponentWeapon = $weapons[rand(0,2)]; // it allow to call a random weapon
if ($opponentWeapon === $weapons[0]) // if opponent have fists
{
$bestWeapon = $weapons[2]; // call gun in $weapons => $bestWeapon
}elseif ($opponentWeapon === $weapons[1]) // if opponent have whip
{
$bestWeapon = $weapons[0]; // call fists in $weapons => $bestWeapon
https://www.zdnet.fr/actualites/php7-souffre-d-une-vulnerabilite-simpliste-mais-dangereuse-39892875.htm
article sur une faille relative a la sécurité des serveur sous PHP 7 qui préconise les dernieres mises a jours qui palient a cette faille.
https://blog.internet-formation.fr/2019/06/5-nouveautes-css-qui-vont-tout-changer-a-la-mise-en-forme/
article sur le passage de CSS 4 a CSS 5 et les avantages qu'il apporte.
https://linux.developpez.com/actu/302511/Linux-Microsoft-offre-jusqu-a-100-000-a-qui-peut-pirater-sa-version-personnalisee-du-systeme-d-exploitation-dediee-a-la-securisation-de-ses-solutions-d-entreprise-pour-l-IoT/
article sur la création par windows d'un systeme Linux qu'ils comptent dédier a la sécurité des entreprises ils proposent une récompense de 100 000$ a la personne qui pourras le pirater.