Skip to content

Instantly share code, notes, and snippets.

View mducharme's full-sized avatar

Mathieu Ducharme mducharme

View GitHub Profile
@mducharme
mducharme / PizzaCalculator.js
Last active February 21, 2024 16:22
Enterprise-Level Typescript Pizza Calculator
// Import the EventEmitter class from Node.js for creating and handling custom events.
import { EventEmitter } from 'events';
// Define an interface for the configuration settings needed for pizza calculation.
interface IConfiguration {
slicesPerPerson: number; // Number of pizza slices each person will eat.
slicesPerPizza: number; // Number of slices that each pizza is divided into.
}
// Define an interface for the calculator, which will compute the number of pizzas needed.
@mducharme
mducharme / refactoring.md
Last active July 17, 2019 14:57
Refactoring city-hub / agora

City-Hub => Agora refactoring

Backend

  • ACL par defaut dans l'admin.
  • Hub
    • Suppression des concepts de resources (maintenant catégories) et scenarios (overkill).
    • Ajout du concept de Person, en développement
      • Trois niveaux d'accès? (Anonymous, Person, User?)
  • Revoir design (fun, responsive) des emails de création de compte.
@mducharme
mducharme / Agora Templates.md
Last active July 23, 2019 21:14
Agora templates

Liste des services

  • Hub
    • Accueil
    • Listes de services
    • Inscription
    • Profil utilisateur
    • Notifications
    • Générique (multifonctionnel)
  • Contact

Onboarding

  • Le onboarding est une excellente idée.
  • Par contre on doit réfléchir à ses objectifs et rédiger son contenu.
  • Je n'y ai donc pas trop pensé.

Accueil

  • L'accueil est un dashboard de home widgets.
  • Les dashboards d'accueil sont gérés par le backend.

ColorScheme

Onboarding

  • ...

HomeDashboard

  • id
  • requireLoggedInUser
  • publishDate
  • expiryDate
@mducharme
mducharme / .htaccess
Created June 27, 2019 19:19
Static cache
# Serve from static (cached) file if it exists (as html or php)
RewriteCond %{DOCUMENT_ROOT}/static/$1/index.html -f
RewriteRule ^(.*)$ static/$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/static/$1/index.php -f
RewriteRule ^(.*)$ static/$1/index.php [L]
@mducharme
mducharme / API.md
Last active June 10, 2019 01:54
Hop Loco API Example data

GET api/v1/projects/{projectId}

Pour avoir les détails d'un projet.

{
    "id": "1930c62a-8f49-4f36-82d7-7cdc40930b46",
    "title": "Report.Cards",
    "clientName": "SEAL Swimming",
    "timeline": {
@mducharme
mducharme / system.md
Created December 19, 2018 04:40
Admin menu

System General Configuration Cache Cache information Static website Email Email configuration Sent email logs Email queue

@mducharme
mducharme / DateTimeParser.php
Created April 9, 2018 01:18
DateTimeParser.php
@@ -0,0 +1,45 @@
<?php
namespace Charcoal\Model\Service;
use DateTime;
use DateTimeInterface;
use Exception;
use InvalidArgumentException;
<?php
namespace Charcoal\Admin\Script\Tools;
use Exception;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Pimple\Container;