Skip to content

Instantly share code, notes, and snippets.

View destpat's full-sized avatar
🏠
Working from home

YV destpat

🏠
Working from home
View GitHub Profile
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active June 1, 2024 09:44
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@bactisme
bactisme / Calcul de l'impot français par tranche.js
Last active February 4, 2022 22:49
Calcul de l'impot français par tranche (javascript)
// http://www.impots.gouv.fr/portal/dgi/public/popup?espId=1&typePage=cpr02&docOid=documentstandard_6182
// Impots sur revenus 2018
// Voir commentaire du gist pour les années suivantes
function impotBareme(montant){
var impot = 0;
var tranches = new Array();
tranches.push([6011, 0]);
tranches.push([11991, 0.055]);
tranches.push([26631, 0.14]);
@benw
benw / load-hbs-partials.js
Created October 3, 2012 00:29
Loads partial handlebars templates from files in a directory
// Helps with this problem:
// http://stackoverflow.com/questions/8059914/express-js-hbs-module-register-partials-from-hbs-file
var hbs = require('hbs');
var fs = require('fs');
var partialsDir = __dirname + '/../views/partials';
var filenames = fs.readdirSync(partialsDir);