Skip to content

Instantly share code, notes, and snippets.

View francoisromain's full-sized avatar

François Romain francoisromain

View GitHub Profile
#!/bin/bash
# source: https://gist.github.com/francoisromain/e28069c18ebe8f3244f8e4bf2af6b2cb
# and another script to create the directories deleted by this script
# project-create.sh: https://gist.github.com/francoisromain/58cabf43c2977e48ef0804848dee46c3
# Call this file with `bash ./project-delete.sh project-name`
# - project-name is mandatory
# This will delete 4 directories

TL;DR

  • il est légalement obligatoire à partir du 7 octobre que le code des projets de la fabrique soit open source
  • la politique de contribution DINSIC est dispo.
  • votre projet doit à minima:
  • choisir une license. En prendre une parmi celles dispo sur data.gouv.fr/fr/licences
  • ouvrir son code
  • préciser qui est mainteneur (pour fournir un point de contact)
  • ne pas hésiter à demander des coups de main à la DSI pour tout ce qui est conformité
@francoisromain
francoisromain / project-create.sh
Last active February 16, 2024 15:08
A bash script to create a Git post-receive hook to deploy after a Git push
#!/bin/bash
# source: https://gist.github.com/francoisromain/58cabf43c2977e48ef0804848dee46c3
# and another script to delete the directories created by this script
# project-delete.sh: https://gist.github.com/francoisromain/e28069c18ebe8f3244f8e4bf2af6b2cb
# Call this file with `bash ./project-create.sh project-name`
# - project-name is mandatory
# This will creates 4 directories and a git `post-receive` hook.
@francoisromain
francoisromain / flatten.js
Last active August 29, 2015 14:21
flatten.js
// flatten an array
// input [[[[1], 2, 3], 4, 5, 6, 7], 8, 9, 10, [11, 12, 13]]
// output [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
var flatten = function(e){
var flatArray = [];
if (!Array.isArray(e)) {
flatArray = flatArray.concat(e);
} else {
for (var i = 0; i < e.length; i++) {
@francoisromain
francoisromain / permutations.js
Last active September 4, 2021 10:37
permutations.js
/*
A function that generates every possible sequences of permutations
of elements in a given array.
For example
with a given array ['rock', 'paper', 'scissors']
and a size = 3;
the output should look something like:
[["rock", "rock", "rock"],
["rock", "rock", "paper"],