Skip to content

Instantly share code, notes, and snippets.

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

BastienSaulnier BastienSaulnier

🏠
Working from home
  • Lille, France
View GitHub Profile
@BastienSaulnier
BastienSaulnier / request.http
Created November 18, 2019 16:54
02 - HTTP Protocol Wild Code School
###GET Wilders
GET https://http-practice.herokuapp.com/wilders
###GET Wilders in JavaScript & page 1000000
GET https://http-practice.herokuapp.com/wilders?langage=JavaScript&page=10
###POST Wilders in JSON
POST https://http-practice.herokuapp.com/wilders
Content-Type: application/json
@BastienSaulnier
BastienSaulnier / sqlqueries.sql
Created November 18, 2019 10:08
03 SQL Wild Code school
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 izardry', '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.01 sec)
@BastienSaulnier
BastienSaulnier / sqlqueries.sql
Created November 18, 2019 09:14
02 SQL Wild Code School
mysql> 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 | |
@BastienSaulnier
BastienSaulnier / poo-js.js
Created October 4, 2019 10:03
Wild Code School - POO en JS - 1
class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}
tellMyName() {
console.log(`I am ${this.name}`);
}
tellMyAge() {
console.log(`I am ${this.age}`);
@BastienSaulnier
BastienSaulnier / app.js
Last active October 2, 2019 09:06
Wild Code School - Installation et utilisation d'un module
var cowsay = require("./node_modules/cowsay");
console.log(cowsay.say({
text : "hello boy",
e : "oO",
T : "U "
}));
@BastienSaulnier
BastienSaulnier / app.js
Created October 2, 2019 07:47
Wild Code School - Découverte de NodeJS
process.stdin.resume()
process.stdin.setEncoding('utf8')
console.log('What\'s your age ? (must be a number, and under 99)')
process.stdin.on('data', (text) => {
if (text <= 99 && text > 0) {
text = 2019 - text;
console.log('You are born in ' + text)
} else {
console.log('Please enter a valid value')
@BastienSaulnier
BastienSaulnier / index.php
Created September 28, 2019 13:25
PHP Quete - 2 - Les variables
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>PHP quete 1</title>
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700" rel="stylesheet">
<meta content="IE=edge" http-equiv=X-UA-Compatible>
<meta content="width=device-width, initial-scale=1" name="viewport">
@BastienSaulnier
BastienSaulnier / hello-wilder.js
Created September 23, 2019 07:55
Base de JavaScript 1 - Découverte du langage
/* hello-wilder.js */
// Define some variables
let movieName = 'Interstellar';
let releaseDate = 2014;
let director = 'Christopher Nolan'
const message = 'Mon film préféré, ' + movieName + ', réalisé par ' + director + ', est sorti en ' + releaseDate;
// Display a popup
alert(message);
@BastienSaulnier
BastienSaulnier / index.html
Created September 13, 2019 14:21
CSS - 09 - Bootstrap : le système de grilles - Wild Code School
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>findtheprecious.com</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
@BastienSaulnier
BastienSaulnier / history.txt
Created September 11, 2019 07:56
Linux Terminal 2 - Wild Code School
455 wget https://github.com/bhubr/bhubr.github.io/raw/master/wild/planets.zip
456 unzip planets.zip
457 eog planets
458 mkdir real fictional inhabited
459 ls
460 cd planets/real
461 cd ..
462 rm -r shell
463 ls
464 mkdir shell