Skip to content

Instantly share code, notes, and snippets.

View GabrielDelepine's full-sized avatar

Gabriel Delépine GabrielDelepine

View GitHub Profile
@GabrielDelepine
GabrielDelepine / bano.ts
Last active October 4, 2023 17:00
Typescript types for BANO
// BANO https://www.data.gouv.fr/fr/datasets/base-d-adresses-nationale-ouverte-bano/
// Tested on the 5.086.571 objects available mid-September 2023
type BanoCity = {
adm_weight: number
city: string
departement: string
id: string
importance: number
lat: number
@GabrielDelepine
GabrielDelepine / getDistanceFromGPS.js
Last active September 14, 2023 08:16
Returns the distance in meter between 2 GPS coordinates
/**
* Returns the distance in meter between 2 GPS coordinates
* @param {number} lat1 - Latitude of the first coordinate
* @param {number} lon1 - Longitude of the first coordinate
* @param {number} lat2 - Latitude of the second coordinate
* @param {number} lon2 - Longitude of the second coordinate
* @returns {number} The distance in meter (float)
*/
function getDistanceFromGPS(lat1, lon1, lat2, lon2) {
if (
@GabrielDelepine
GabrielDelepine / bootstrap-dropdown-menu-sliding.css
Last active May 24, 2016 11:11
This file include only a fixed bug compare the original one : dropdown menu was always open in other browser than webkit. (I only add "transform: scale(1, 0)" at the line N°18)
.open > .dropdown-menu {
-webkit-transform: scale(1, 1);
transform: scale(1, 1);
}
.open > .dropdown-menu li a {
color: #000;
}
.dropdown-menu li a{
color: #fff;