Skip to content

Instantly share code, notes, and snippets.

View mininao's full-sized avatar

Maxence Aïci mininao

View GitHub Profile
@mininao
mininao / sg-project.md
Created July 19, 2023 08:31
SG project

Instructions projet Quality & Testing

  1. Choisissez un projet parmi ceux de l'organization
  2. Utilisez le template pour créer votre repo (Use this template -> New repository)
  3. Vous pouvez utiliser les technologies installées de base, ou celles de votre choix
@mininao
mininao / recette_bolo_vg.md
Last active June 14, 2023 13:59
Recette de bolognaise végétarienne
@mininao
mininao / e2e-testing.md
Last active July 19, 2023 07:56
E2E testing workshop instructions

Exercice de testing e2e avec cypress

Objectif

Ecrire 2-4 tests end to end sur une application quasi-réelle, avec Cypress.

Fonctionnalités à tester :

  • Login
  • Envoyer de l'argent
@mininao
mininao / GasPrice.test.js
Created October 24, 2022 15:46
gaspricetest
import React from "react";
import { render, screen } from "@testing-library/react";
import GasPrice from "./GasPrice";
import { getGasPrice } from "./getGasPrice";
jest.mock("./getGasPrice");
test("renders a gas price message", () => {
getGasPrice.mockReturnValue(2);
@mininao
mininao / birds.js
Last active October 11, 2022 05:57
Corrigés 1
// @ts-check
//
// The line above enables type checking for this file. Various IDEs interpret
// the @ts-check directive. It will give you helpful autocompletion when
// implementing this exercise.
/**
* Calculates the total bird count.
*
* @param {number[]} birdsPerDay
@mininao
mininao / velibs.sh
Created October 1, 2021 08:47
Get available velibs at a station
velib curl -s "https://velib-metropole-opendata.smoove.pro/opendata/Velib_Metropole/station_status.json" | jq '.data.stations' | grep "\"STATION-NUMBER\"" -B 1 -A 18
@mininao
mininao / extract_pr_info.js
Created July 29, 2021 15:04
Github PR merge slack notifier via Zapier
function getImages(string) {
const imgRex = /((http)?s?:?(\/\/[^"']*\.(?:png|jpg|jpeg|gif|png|svg)))/ig;
const images = [];
let img;
while ((img = imgRex.exec(string))) {
images.push(img[1]);
}
return images;
}
const {title, commitUrl} = inputData
<div class="px-4 py-5 my-5 text-center">
<h1 class="display-5 fw-bold">Maintenance en cours</h1>
<div class="col-lg-6 mx-auto">
<p class="lead mb-4">
Covidliste est en cours de maintenance planifiée, de 10h à 11h le lundi 5 avril. <br>
</p>
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center">
<a href="https://twitter.com/covidliste" class="btn btn-info btn-lg px-4 me-sm-3">Twitter @covidliste</a>
</div>
@mininao
mininao / Color_bulb.md
Created January 17, 2021 17:20
Tradfri Commands

Blink

ieee: bc:33:ac:ff:fe:a0:ef:d0
endpoint_id: 1
cluster_id: 0x0003
cluster_type: in
command: 0x0040
command_type: server
args: [0,0]
@mininao
mininao / pdfs2pngs.sh
Created August 22, 2020 15:34
Convert pdfs to pngs
for file in *.png
do
convert -density 150 $file $file.png
done