Skip to content

Instantly share code, notes, and snippets.

View stephanBerger's full-sized avatar
💭
I may be slow to respond.

sBerger stephanBerger

💭
I may be slow to respond.
  • CAF des Bouches-du-Rhône
  • Marseille
View GitHub Profile
@stephanBerger
stephanBerger / mysql.txt
Created October 12, 2019 20:12
Les jointures
mysql> SELECT wizard.lastname,wizard.firstname,player.role,team.name
-> FROM player JOIN wizard ON wizard_id=wizard.id
-> JOIN team ON team_id=team.id
-> ORDER BY team.name, player.role, wizard.lastname, wizard.firstname;
+-----------------+-------------+--------+------------+
| lastname | firstname | role | name |
+-----------------+-------------+--------+------------+
| Black | Sirius | beater | Gryffindor |
| Brown | Lavender | beater | Gryffindor |
| Finnigan | Seamus | beater | Gryffindor |
@stephanBerger
stephanBerger / challenge.txt
Last active September 29, 2019 06:12
03 - Manipulation des données
INSERT INTO school (name, country, capacity)
-> VALUES ('Beauxbatons Academy of Magic', 'France', '500'),
-> ('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');
@stephanBerger
stephanBerger / challenge.txt
Last active September 27, 2019 09:49
Récupérer des informations avec SELECT
mysql> 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 |
| 7 | george | weasley | 1978-04-01 | |
@stephanBerger
stephanBerger / pseudoCode
Last active September 22, 2019 17:09
Algorithmique et pseudo-code
Début calculNombreBonbons(réel money, réel price)
money ← 12.47;
price ← 1.14
entier candies ← 0
Si money > 0 ET price > 0
Tant que (money - price) >= 0
candies ← candies + 1
money ← money - price
Fin Tant que
@stephanBerger
stephanBerger / index.html
Last active September 21, 2019 13:40
Javascript-1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Javascript-1</title>
<script src="script.js"></script>
</head>
<body>
<main>
@stephanBerger
stephanBerger / history.txt
Created September 14, 2019 09:38
Linux Terminal 3
754 grep France,2019,PHP wilders.txt | wc -l > php_france_2019.txt
755 grep JavaScript wilders.txt | grep "Toulouse\|Biarritz" > javascript_biarritz_toulouse.csv
756 history | tail -n 5 > history.txt
@stephanBerger
stephanBerger / history
Created September 13, 2019 11:27
Linux Terminal 2
481 wget https://github.com/bhubr/bhubr.github.io/raw/master/wild/planets.zip
482 unzip planets.zip
483 eog planets/
484 ls
485 cd planets
486 ls
487 mkdir real fictional inhabited
488 ls
489 cd real/
# Git is our friend !!
### What is git ?
First of all, [GitHub](https://hackernoon.com/tagged/github) is _not_ git. Many people understandably confuse the two. [GitHub](https://github.com/) is a website for hosting projects that _use_ git.
Git is a type of [**version control**](https://hackernoon.com/tagged/version-control) **system** (VCS) that makes it easier to track changes to files. For example, when you edit a file, git can help you determine exactly _what_ changed, _who_ changed it, and _why_.
It’s useful for coordinating work among multiple people on a project, and for tracking progress over time by saving “checkpoints”. You could use it while writing an essay, or to track changes to artwork and design files.
@stephanBerger
stephanBerger / history
Created September 12, 2019 18:46
Linux - Terminal 2 - Fichiers et répertoires
1093 cd quetes/
1094 mkdir -p quetes/shell/legumes quetes/shell/fruits
1095 ls
1096 mkdir quetes/shell/effacez-moi quetes/shell/delete-me
1097 ls quetes/shell/
1098 rmdir quetes/shell/effacez-moi/ quetes/shell/delete-me/
1099 cd ~/quetes/shell
1100 cd quetes/shell
1101 touch pomme
1102 touch poire
(base) rencho@sb-7745G:/home/workspace$ ls -aR
.:
. .. readme xml
./xml:
. .. index.xml
(base) rencho@sb-7745G:/home/workspace$ ll -aR
.:
total 12
drwxr-xr-x 3 root root 4096 sept. 11 22:28 ./