Skip to content

Instantly share code, notes, and snippets.

View Bernardstanislas's full-sized avatar
🛫
Taking off

Stanislas Bernard Bernardstanislas

🛫
Taking off
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Strategy design pattern

Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from the clients that use it. Capture the abstraction in an interface, bury implementation details in derived classes.

A Strategy defines a set of algorithms that can be used interchangeably. Modes of transportation to an airport is an example of a Strategy. Several options exist such as driving one's own car, taking a taxi, an airport shuttle, a city bus, or a limousine service. Any of these modes of transportation will get a traveler to the airport, and they can be used interchangeably.

Dojo CQRS ⭐

Notes

  • Carte 1 Dans la checklist, I have made a copy of the repository est confusant, je pense que tu parlais du Board Trello. Aussi, ajoute un check comme quoi le mec est bien en train de modifier son board et non pas le board de base. Peut-être mettre les mecs en lecture seule ?
  • Carte 2 Pourquoi les $ au début de chaque commande ?
  • Carte 15 Pas testé pour VSCode, pour Phpstorm c'était assez simple, j'ai suivi Running and Debugging Node.js - Help | PhpStorm avec les paramètres du package.json (node-parameters: --inspect-brk -r ts-node/register -r tsconfig-paths/register)
  • Carte 3 Tu appelles ta route /articles, mais la
import React, {PropTypes} from 'react';
import ProductCard from '../../molecule/product-card';
import PromoCode from '../../atom/promo-code';
import PaymentForm from '../../molecule/payment-form';
import style from './style.css';
const Cart = ({
productCardProps,
promoCodeProps,

Manage your web assets with Webpack

As a frontend Javascript developer, managing your source files can quickly get tricky. If Node has a built-in module resolver —require— there is no built-in module resolver in the browsers.

In this article, I will get you started with Webpack, a very powerful tool to organize, compile and package your source files. Webpack is an asset manager that will let you compile, optimize, minify all your files: Javascript, CSS, pictures...

Instead of presenting a Webpack boilerplate or starter kit, I will show you how to build a web application step by step from scratch, so that you will end up with a fully working solution that you are comfortable coding with.

@Bernardstanislas
Bernardstanislas / squash-hook.js
Last active April 5, 2016 12:42
Squash hook as a bridge to firebase
import Firebase from 'firebase';
const firebaseRef = new Firebase('https://squanalytics.firebaseio.com');
const pointsRef = firebaseRef.child('points');
const stanPointsRef = pointsRef.child('stan');
const arthurPointsRef = pointsRef.child('arthur');
export default async function (hook) {
const currentTime = new Date();
import React from 'react';
import TextInput from './TextInput';
const TodoItem = ({text}) => (
<li className="todo">
<div className="view">
<input type="checkbox" className="toggle" />
<label htmlFor="todo">
{text}
@Bernardstanislas
Bernardstanislas / caracteres.json
Created February 9, 2016 10:51
Caratères JSON
{
"A": [
[0,0,0,0,0,0,0],
[0,0,0,1,0,0,0],
[0,0,1,0,1,0,0],
[0,0,1,0,1,0,0],
[0,1,0,0,0,1,0],
[0,1,1,1,1,1,0],
[0,1,0,0,0,1,0],
[1,0,0,0,0,0,1]