Skip to content

Instantly share code, notes, and snippets.

View moni-be's full-sized avatar
🏠
Working from home

moni-be

🏠
Working from home
  • France
View GitHub Profile
@moni-be
moni-be / Linux2
Last active March 4, 2020 12:35
Linus2
vpb@vpb-HP-Pavilion-Notebook:~/quetes/shell/planets$ cd real
vpb@vpb-HP-Pavilion-Notebook:~/quetes/shell/planets/real$ ls
dwarf-planets gas-giants tellutic
vpb@vpb-HP-Pavilion-Notebook:~/quetes/shell/planets/real$ cd ..
vpb@vpb-HP-Pavilion-Notebook:~/quetes/shell/planets$ ls
fictional inhabited real
vpb@vpb-HP-Pavilion-Notebook:~/quetes/shell/planets$ cd real
vpb@vpb-HP-Pavilion-Notebook:~/quetes/shell/planets/real$ ls
dwarf-planets gas-giants tellutic
vpb@vpb-HP-Pavilion-Notebook:~/quetes/shell/planets/real$ rm -rf dwarf-planets/
Fichier 1/PHP Campus France 2019
(nombre d'élèves : 97)
➜ Linux wc php_france_2019.csv >> php_france_2019.txt
➜ Linux cat php_france_2019.txt
97 111 3819 php_france_2019.csv
****ou*****
➜ Linux cat php_france_2019.csv | wc -l > php_france_2019.csv
➜ Linux cat php_france_2019.csv
97
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JS1 - Mon film préféré!</title>
</head>
<body>
<script>
@moni-be
moni-be / Quête1 - Node.js
Created March 25, 2020 15:43
(wcs)Node.js 1/ Découverte
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', (text) => {
console.log("Quelle âge avez-vous ?")
const aujourd = 2020;
let dateNais = aujourd - parseInt(text);
if(text >0 && text <=99 && text < 2020){
console.log('Vous avez ' + text + 'an(s)' + 'et vous êtes-née.éée en : '+ dateNais);
process.exit();
}else{
@moni-be
moni-be / (wcs)Quête2 -Node.js
Last active March 26, 2020 13:05
Installation et utilisation d'un module
process.stdin.resume()
process.stdin.setEncoding('utf8')
var cowsay = require("cowsay");
console.log(cowsay.say({
text : "hello boy",
e : "oO",
T : "U "
}));
@moni-be
moni-be / POO : class Person
Created March 26, 2020 17:57
(wcs) POO en JS 1
class Person{
constructor(name, age){
this.name = name;
this.age = age;
}
getName(){
return this.name;
}
@moni-be
moni-be / DB: query-select
Last active June 1, 2020 17:16
(WCS)DB2-Select
1/
mysql> SELECT * FROM wizard WHERE birthday BETWEEN '1975-01-01' AND '1985-01-01';
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| 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 |
@moni-be
moni-be / DB: query-Insert
Last active June 1, 2020 17:17
(wcs) DB3-données
1/
mysql> INSERT INTO `wild_db_quest`.`school` (`name`, `country`, `capacity`) VALUES ('Beauxbatons Academy of Magic', 'France', '550');
Query OK, 1 row affected (0.01 sec)
mysql> INSERT INTO `wild_db_quest`.`school` (`name`, `country`, `capacity`) VALUES ('Castelobruxo', 'Brazil', '380');
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO `wild_db_quest`.`school` (`name`, `country`, `capacity`) VALUES ('Durmstrang Institute', 'Norway', '570');
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO `wild_db_quest`.`school` (`name`, `country`, `capacity`) VALUES ('Hogwarts School of Witchcraft and Wizardry', 'United Kingdom', '450');
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO `wild_db_quest`.`school` (`name`, `country`, `capacity`) VALUES ('Ilvermorny School of Witchcraft and Wizardry', 'USA', '300');
@moni-be
moni-be / DB: Intro
Last active June 1, 2020 17:17
(WCS)Introduction au développement
1/Base de données SQL
Serveur ou ordinateur qui sert à stocker des données. Le développeur peut accèder aux données d'une DB à travers une application et au langage SQL.
2/Réseau (HTTP)
Le protocole HTTP internet est un échange entre un serveur et un terminal client établi à travers une application qui envoie de rêquettes, et qui returne de réponses et/ou des données au client.
3/Programmation server (Serveur d'application)
Le développeur peut programmer une application qui lui permettra d'accèder à la DB ainsi qu'aux actions principales de gestion : authentification, envoi d'e-mails, suavegarde de données et génération de documents, etc.
@moni-be
moni-be / Pratique
Created May 29, 2020 16:31
(WCS)Le protocole HTTP
### GET api.kerokuapp.com (no parameter)
GET https://http-practice.herokuapp.com/wilders
### GET api.kerokuapp.com (parameters language and page)
GET https://http-practice.herokuapp.com/wilders?language=JavaScript&page=20
###POST api.kerokuapp.com (insertion data in form-urlencoded, parameters name and language)
POST https://http-practice.herokuapp.com/wilders
Content-Type: application/x-www-form-urlencoded