Component flex qui va se charger de loader les bundles dont on aura besoin dans son projet
(ex: Doctrine
, Twig
, SwiftMailer
, ...) pour ne pas a se frapper l'ajout suppression
des bundle/composant par défaut. Pas de notion de bundle pour l'application (on pourra
toujours en faire, mais déconseillé). Va sortir d'ici 2 semaines, en même temps que les blogs
post de @fabpot. D'après moi, une approche orrienté micro-services dans cette nouvelle version.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dayjs = require("dayjs"); | |
function generateRandomInteger(min, max) { | |
return Math.floor(min + Math.random() * (max - min + 1)); | |
} | |
const today = dayjs(); | |
let date = today.subtract(1, "year"); | |
const cmd = `git init && git ci --allow-empty -m 'root' --date '${date.format("YYYY-MM-DD HH:mm:ss")}'`; | |
console.log(cmd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyClass { | |
constructor(private name: string){} | |
func1 = () => { return this.name; } | |
func2() { | |
return this.name; | |
} | |
} | |
const object = new MyClass('MyName'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const crypto = require('crypto'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const zlib = require('zlib'); | |
const AppendInitVect = require('./appendInitVect'); | |
const getCipherKey = require('./getCipherKey'); | |
function encrypt({ file, password }) { | |
// Generate a secure, pseudo random initialization vector. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { flow, chunk, map } = required('lodash/fp'); | |
// batchInsert | |
const knexInsert = knex => async rows => knex.batchInsert('equipment_city', rows, BATCH_INSERT); | |
// batchInsert on duplicate | |
const knexInsertOnDuplicate = knex => /* async */ rows => flow( | |
chunk(BATCH_INSERT), | |
map(insertOnDuplicate(knex)) | |
)(rows); |