Skip to content

Instantly share code, notes, and snippets.

View tomsihap's full-sized avatar

tomsihap

View GitHub Profile
@tomsihap
tomsihap / sakila-db-exercises.sql
Last active April 4, 2024 15:40
Sakila DB Exercises
# __
# .--------.--.--.-----.-----.| |
# | | | |__ --| _ || |
# |__|__|__|___ |_____|__ ||__|
# |_____| |__|
#
# e x e r c i s e s
# Important: Remember to add a semi-colon at the end of each query.
@tomsihap
tomsihap / 01enonce.md
Last active March 25, 2024 11:46
TP Symfony
@tomsihap
tomsihap / gist:e703b9b063ecc101f5a4fc0b01a514c9
Created December 23, 2018 14:46
Install NVM in Ubuntu 18.04 with ZSH
# Find the latest version on https://github.com/creationix/nvm#install-script
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
# Add in your ~/.zshrc the following:
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
$ source ~/.zshrc
<?php
/**
* Exercices de PHP :
*/
/**
* 1. Déclarer ces deux variables et les débuguer avec var_dump :
* => nombre = 123
* => texte = "hello world"
@tomsihap
tomsihap / arrays.md
Last active August 29, 2023 20:50
PHP Exercises: arrays

Array Exercises (PHP)

Questions

  1. Soit un tableau $a = array( 0, 1, 2, 3, 4 );, comment afficher la valeur 3 du tableau ?

  2. Afficher la valeur 3 du tableau suivant :

$a = [
  "zero"  => 0,
@tomsihap
tomsihap / 01-tp.md
Last active August 24, 2023 06:53
TP : PHP-POO-MVC

Cours de PHP, POO et MVC avancé

Résumé du cours

Nous allons créer un projet en MVC contenant au moins trois tables : deux tables jointes par une relation N-N, avec une table de jointure entre les deux. Le projet sera développé en architecture MVC et en utilisant des packages Composer.

Les projets sont les suivants :

Liste des projets

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

@tomsihap
tomsihap / github-conventional-comments.js
Last active February 3, 2023 09:23 — forked from ifyoumakeit/github-conventional-comments.js
GitHub Conventional Comments (instructions to install in comment below code)
(async function generateReplies(document) {
// https://conventionalcomments.org/#labels
const DATA = {
praise: { label: "👏 praise", comment: "Praises highlight something positive. Try to leave at least one of these comments per review. Do not leave false praise (which can actually be damaging). Do look for something to sincerely praise."},
nitpick: { label: "🤓 nitpick", comment: "Nitpicks are small, trivial, but necessary changes. Distinguishing nitpick comments significantly helps direct the reader's attention to comments requiring more involvement." },
suggestion: { label: "💡 suggestion", comment: "Suggestions propose improvements to the current subject. It's important to be explicit and clear on what is being suggested and why it is an improvement. Consider using patches and the blocking or non-blocking decorations to further communicate your intent." },
issue: { label: "Ø issue", comment: "Issues highlight specific problems with the subject under review. These problems can be user-f
@tomsihap
tomsihap / functions.md
Last active February 2, 2023 14:01
PHP functions exercises

PHP : Fonctions

Schéma d'une fonction

Fonction basique

Une fonction basique est définie par le mot-clé fonction et exécute les instructions définies dans la fonction lorsque la fonction est appelée. Attention, on ne peut pas appeler une fonction avant qu'elle ait été définie :

function sayHelloWorld() {
    echo "Hello world";
}
@tomsihap
tomsihap / 01.md
Last active July 29, 2022 14:52
TP Symfony

TP-01 : Création du projet et routes

Exercices

1. Créer le projet

Créer un projet Symfony nommé Symazon qui sera une boutique en ligne.

Aide : Créer un nouveau projet En étant dans le dossier des projets Symfony, créeez le projet avec : $ composer create-project symfony/website-skeleton Symazon