Skip to content

Instantly share code, notes, and snippets.

Benoit Lemoine blemoine

  • Mnubo
  • Montréal
Block or report user

Report or block blemoine

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@blemoine
blemoine / utilities.ts
Created Mar 21, 2017
Lodash schortcuts in typescript
View utilities.ts
interface User {
firstName:string;
lastName:string;
age:number;
}
const user1= {firstName:"Georges",lastName:"Abitbol", age:43}
const user2 = { firstName: "Joel", lastName: "Hammond", age: 25 }
const arr: Array<User> = [user1, user2]
@blemoine
blemoine / gist:6ea25402b37e9830f6ca
Created Sep 9, 2015
Compressing GeoJSON with informations loss
View gist:6ea25402b37e9830f6ca
/*
pour lancer :
node geoJsonMinifier.js <cheminDuFichierGeoJson> > <cheminDuFichierDeSorti>
*/
var fs = require('fs');
var _ = require('lodash');
var geoJsonPath = process.argv[2];
@blemoine
blemoine / gist:e6045ed93b3d90a52891
Last active May 11, 2019
Convert Lambert 93 to GPS Coordinates Latitude / Longitude (wgs84)
View gist:e6045ed93b3d90a52891
Math.tanh = Math.tanh || function(x) {
if(x === Infinity) {
return 1;
} else if(x === -Infinity) {
return -1;
} else {
return (Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x));
}
};
You can’t perform that action at this time.