Skip to content

Instantly share code, notes, and snippets.

View clrko's full-sized avatar
🤓

Claire Lenfant-Kodia clrko

🤓
View GitHub Profile
@clrko
clrko / index.html
Last active February 28, 2020 11:23
Le Grand Oeil - 09 - Bootstrap : le système de grilles
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8"/>
<meta name="author" content="Claire Kodia">
<meta name="description" content="Le Grand Œil sur sa tour de Barad-Dûr">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="./style.css">
@clrko
clrko / desktop_resolution.css
Created March 8, 2020 18:02
QuestX1-CssGrid
.grid {
display: grid;
grid-template-rows: repeat(5, minmax(10px auto));
grid-template-columns: repeat(3, 1fr);
grid-template-areas:
"header header header"
"carousel carousel join"
"carousel carousel form"
"fellows fellows form"
"fellows fellows footer";
@clrko
clrko / txt
Created May 26, 2020 10:44
SQL_ quest2
mysql> SELECT * FROM wizard WHERE birthday BETWEEN '1975-01-01' AND '1980-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 |
| 6 | fred | weasley | 1978-04-01 | | | 0 |
+----+-----------+----------+------------+-------------+------------------------+-----------+
4 rows in set (0.01 sec)
@clrko
clrko / txt
Created May 26, 2020 11:08
SQL_quest3
mysql> SELECT * FROM school;
Empty set (0.01 sec)
mysql> INSERT INTO school (name, country, capacity) VALUES ('Beauxbatons Academy of Magic', 'France', 550), ('Castelobruxo', 'Brazil', 380), ('Durmstrang Institute', 'Norway', 570), ('Hogwarts School of Witchcraft and Wizardry', 'United Kingdom', 450), ('Ilvermorny School of Witchcraft and Wizardry', 'USA', 300), ('Koldovstoretz', 'Russia', 125), ('Mahoutokoro School of Magic', 'Japan', 800), ('Uagadou School of Magic', 'Uganda', 350);
Query OK, 8 rows affected (0.02 sec)
Records: 8 Duplicates: 0 Warnings: 0
mysql> SELECT * FROM school; +----+----------------------------------------------+----------+----------------+
| id | name | capacity | country |
+----+----------------------------------------------+----------+----------------+
@clrko
clrko / requests.http
Created June 1, 2020 08:51
Quest_2_requests
### GET application status
GET https://http-practice.herokuapp.com/status
### GET application status (format JSON)
GET https://http-practice.herokuapp.com/status
Accept: application/json
### GET fictional wilders (format JSON for PHP 2nd page)
GET https://http-practice.herokuapp.com/wilders?language=PHP&page=2
Accept: application/json
@clrko
clrko / server.js
Created June 1, 2020 12:16
Quest3_node_server
const http = require('http');
const url = require('url');
const port = 8000;
const requestHandler = (request, response) => {
const requestedUrl = request.url
const parsedUrl = url.parse(requestedUrl, true);
const name = parsedUrl.query.name
const city = parsedUrl.query.city
@clrko
clrko / index.js
Created June 1, 2020 12:45
Quest4_node_express_routes
const express = require('express');
const app = express();
const port = 3000;
app.get('/', (request, response) => {
response.send('Bienvenue sur Express');
});
app.get('/api/movies', (request, response) => {
response.send('Récupération de tous les films');
@clrko
clrko / index.js
Created June 1, 2020 13:44
Quest5_node_express_bdd
const express = require('express');
const connection = require('./conf');
const app = express();
const port = 3000;
// écoute de l'url "/api/employees"
app.get('/api/employees', (req, res) => {
// connection à la base de données, et sélection des employés
connection.query('SELECT * from employee', (err, results) => {
if (err) {
@clrko
clrko / wild_db_quest.sql
Created June 3, 2020 19:42
Quest5_database_mysql
SELECT lastname, firstname, role, name
FROM wizard
INNER JOIN player
ON wizard.id = player.wizard_id
INNER JOIN team
ON player.team_id = team.id
ORDER BY name, role, lastname, firstname ASC;
SELECT firstname, lastname
@clrko
clrko / wild_db_quest2.sql
Created June 4, 2020 09:00
Quest6_database_mysql
SELECT name, COUNT(*)
FROM player
JOIN team
ON player.team_id = team.id
GROUP BY name
ORDER BY COUNT(*) DESC;
SELECT name, COUNT(*)
FROM team
JOIN player