Skip to content

Instantly share code, notes, and snippets.

View olygood's full-sized avatar

olygood olygood

  • Liege
View GitHub Profile
@olygood
olygood / main.js
Created February 6, 2021 19:14
tableaux poker
let a = 4;
let b = 3;
let c = 2;
let d = 1;
let e = 0;
let f = 10;
let g = 0;
let h = 0;
let i = 6;
let j = 0;
@olygood
olygood / babel.config.js
Last active February 14, 2021 17:18
babel js config
//créer un nouveau fichier :
//babel.config.js
//babe avec react:
const presets = [
[
"@babel/preset-env",
{
"@babel/preset-react", {
"runtime": "automatic"
}
@olygood
olygood / form.html
Last active February 24, 2021 11:18
fetch async/await formulaire avec reponse du server api
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Mulish:wght@300;400;700&display=swap" rel="stylesheet">
<title>formulaire</title>
@olygood
olygood / virtualisation.txt
Last active September 22, 2021 20:07
virtualisation windows 10 for docker
activer la virtualistaion du bios (important)
download wsl 2 update
panneau de configuration / activé désactivé des fonctionnalités windows /
hyper v / activé
sous systeme windows pour linux /activé
attention j'ai desinstaler le debogeur visual studio a cause des deux fenetre d'erreur mais faut peut etre la réactiver
telecharge une sistribution linux (debian,ubuntu, etc ..) et lance la une fois
powershell wsl -l -v regarder les version installer elles doivent être en VERSION 2
PS C:\Users\olygo> wsl -l -v
NAME STATE VERSION
@olygood
olygood / docker.file
Created September 22, 2021 09:13
docker création de container
- -f spécifie le fichier à utiliser pour la construction (dockerfile par defaut)
- - -tag / -t spécifie le nom de l'image ([registry/])user/repository:tag)
- - -label ajout de métadonnées à l'image
@olygood
olygood / git.txt
Last active September 23, 2021 08:16
GIT fonctionnalités
4# INITIALIZATION
# 01.Se connecter sur votre GitHub, cliquer sur "Repositories", puis sur "New"
# 02.Nommer le Repository (ici Git_Exemple)
# 03.Cliquer sur "Add .gitignore : Unity"
# 04.Cliquer sur "Create repository"
@olygood
olygood / README.md
Last active October 4, 2021 15:18
Project Snake Babel, Webpack

npm init -y
install module du packages.json
webpack.config.js babel.config.json create src folder // index.html // index.js
dans le package json créer "webpak" : "serve" :

@olygood
olygood / main.js
Created October 5, 2021 06:18
project html5 game loop
// game loop setInterval sur 1000 => 1/60 ou 1000/60 conseillé
init()
let interval = setInterval(run,1000);
function run()
{
update();
draw();
}
@olygood
olygood / gameLoop.js
Last active July 28, 2022 05:04
game loop html5 javascript
const canva = document.getElementById('canva');
let ctx = canva.getContext('2d');
load();
let interval = setInterval(run,1000/60);
function run()
{
update();
@olygood
olygood / snippets-css.json
Last active August 19, 2022 13:28
snippets html/ css/ javascript
{
"Absolute-Center":{
"prefix": "absolute-center",
"body":[
"position:absolute;\rtop:50%;\rleft:50%;\rtransform:translate(-50%,-50%);"
],
"description": "center an absolute position element."
},
"flex-Center":{
"prefix": "flex-center",