Skip to content

Instantly share code, notes, and snippets.

View arnaudrenaud's full-sized avatar

Arnaud Renaud arnaudrenaud

View GitHub Profile
@arnaudrenaud
arnaudrenaud / README.md
Last active July 8, 2021 12:00
Mise en place d'une base de données Postgres

Vérifiez si Postgres est installé sur votre ordinateur :

psql --version

Sinon, installez Postgres.

Lancez la console Postgres en tant que l'utilisateur postgres :

@arnaudrenaud
arnaudrenaud / index.js
Created June 28, 2019 15:59
Jest inline snapshots example
const parseDate = (year, fullDate) => {
if (!year) {
throw new Error('arg year is missing');
}
if (!fullDate) {
return new Date(year);
}
return new Date(fullDate);
};
module.exports = parseDate;
@arnaudrenaud
arnaudrenaud / articles.json
Last active May 17, 2019 14:16
Articles – sample data
{
"articles": [
{
"id": "3B8A9F8D-8E8D-43D6-BCB8-E136D3AD279D",
"title": "A journey through internet garbage"
},
{
"id": "85D4407D-496C-43BD-9B4D-93B6064B76EA",
"title": "The Cost of Fixing Things"
},