Dans le terminal, depuis le dossier utilisateur (home) :
michael@dwaps-formation:~$ cd Desktop/mon-super-projet
michael@dwaps-formation:~$ git init
Initialized empty Git repository in C:/Users/conta/Desktop/tests/.git/
Dans le terminal, depuis le dossier utilisateur (home) :
michael@dwaps-formation:~$ cd Desktop/mon-super-projet
michael@dwaps-formation:~$ git init
Initialized empty Git repository in C:/Users/conta/Desktop/tests/.git/
class EventEmitter { | |
constructor() { | |
this.events = {}; | |
} | |
on(eventName, listener) { | |
this.events[eventName] = this.events[eventName] || []; | |
this.events[eventName].push(listener); | |
} |
const mail = "cocojaco@mail.fr"; | |
const regex = new RegExp("^(\\w+)@(\\w+\\.\\w{2,4})$"); | |
const mailOK = regex.test(mail); | |
const groups = regex.exec(mail); | |
const localPart = groups[1]; | |
const domainPart = groups[2]; | |
{ | |
"doctype": { | |
"description": "Generate DOCTYPE", | |
"prefix": "!", | |
"body": [ | |
"<!DOCTYPE html>", | |
"<html lang=\"fr\">", | |
"\t<head>", | |
"\t\t<meta charset=\"utf-8\">", | |
"\t\t<title>${1:TITLE}</title>\n", |
// CLASSE | |
class Todo { | |
constructor(text) { | |
this.text = text; | |
this.done = false; | |
} | |
} | |
// RECUP DES TODOS | |
const todos = [ |
// Model | |
class User { | |
constructor(name, role) { | |
this.name = name; | |
this.role = role; | |
} | |
} | |
// BDD | |
const users = [ |
if ('geolocation' in navigator) { | |
const { geolocation } = navigator; | |
geolocation.getCurrentPosition(success, error); | |
function success(position) { | |
const { coords } = position; | |
const p = document.querySelector('p'); | |
p.innerHTML = ` | |
<strong>LAT:</strong> ${coords.latitude}<br> | |
<strong>LNG:</strong> ${coords.longitude} |
<!DOCTYPE html> | |
<html lang="fr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>TITLE</title> | |
<link rel="stylesheet" href="css/style.css"> | |
</head> | |
<body> |
<!DOCTYPE html> | |
<html lang="fr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>TITLE</title> | |
<link rel="stylesheet" href="css/style.css"> | |
</head> | |
<body> |