Skip to content

Instantly share code, notes, and snippets.

@Yumenotsuki
Yumenotsuki / index.js
Last active November 18, 2018 10:43
Node Js - créer un serveur HTTp
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
var url = req.url;
if(req.url.includes("/display/")){
const user = req.url.slice(9, req.url.length);
res.write(`Vous tentez d'afficher le profil de` + `$user`);
res.end();
@Yumenotsuki
Yumenotsuki / about.html
Created November 12, 2018 15:29
Quête serveur HTTP -wild code school
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<h2>About us</h2>
</body>
@Yumenotsuki
Yumenotsuki / index.html
Created October 29, 2018 13:37
Compteur redux - quête redux 1
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Counter Redux</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Redux CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.1/redux.min.js"></script>
@Yumenotsuki
Yumenotsuki / cowsay.txt
Created September 20, 2018 14:20
Quête Nodejs 2
> var cowsay = require("cowsay");
undefined
> console.log(cowsay.say({text : "Hello boy", e : "o0", T : "U "}));
___________
< Hello boy >
-----------
\ ^__^
\ (o0)\_______
(__)\ )\/\
U ||----w |
@Yumenotsuki
Yumenotsuki / nodejs-1.js
Last active September 18, 2018 08:13
Node js quête 1 -wild code school
process.stdin.resume()
process.stdin.setEncoding('utf8')
const thisYear = 2018;
let age = 0;
console.log('How old are you ? ');
process.stdin.on('data', (age) => {
if (age < 100 && age > 0 && age < thisYear) {
@Yumenotsuki
Yumenotsuki / base_javascript1.html
Created September 11, 2018 15:09
base de javascript 1 - Wild code school
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Base de JavaScript 1</title>
</head>
<body>
<script src="base_javascript1.js"></script>
</body>
@Yumenotsuki
Yumenotsuki / javascripting.txt
Created September 11, 2018 13:24
javascripting - wild code school
let ask = prompt("Hey, mon ami ! Tu aimes ça les patates ?");
if (ask == "Oui" || ask == "oui") {
var potatoes = "";
for (var i = 1; i <= 7; i++) {
potatoes += "#";
console.log(potatoes);
}
}
else if (ask == "Non" || ask == "non") {
@Yumenotsuki
Yumenotsuki / pseudo-code.txt
Last active September 11, 2018 15:15
Quête JS 1 - Wild code school
VARIABLE
nombreSaisi
compteur <- 0
DEBUT
Lire nombreSaisi
TANT QUE nombreSaisi < compteur
Retourner "Bienvenue à la Wild"
@Yumenotsuki
Yumenotsuki / algoritme.txt
Last active September 11, 2018 04:17
Algorithme et pseudo code - quête wild code school
Objectif : Caculer le nombre de bonbons que tu peux acheter avec une somme d'argent donnée et un prix donné
Variables :
argent <== x (réel)
prix <== y (réel)
qté_bonbons <== 0
Calcul :
@Yumenotsuki
Yumenotsuki / terminal.txt
Created September 4, 2018 15:44
Linux-quête wild code school
marion@wilder-ThinkPad-T440p:~/Musique$ cd
marion@wilder-ThinkPad-T440p:~$ clear