npm install
npm run webpack
This is a wrapper for Mapbox Geocoding API.
It uses Angular, Mapbox GL, RxJS and lodash.
Original documentation here: https://docs.mapbox.com/api/search/#geocoding
This function takes a date string and its specific timezone and return a converted date object in client's local timezone
// the string date "2020-01-15 15:25:55" is based on Berlin timezone
// jetLag will give us a Date instance in the right client's local timezone.
const localDate = jetLag("2020-01-15 15:25:55", "Berlin");
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
-------------------------------------------------------- | |
-- Add key into a nested object and hard code its value | |
-------------------------------------------------------- | |
UPDATE my.table | |
SET data = jsonb_set(data::jsonb, '{"user","config","application"}', '"GOOGLE"'); | |
/* | |
-- before | |
{ | |
"user": { | |
"fullname": "Barney Stinson", |
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
// example taken from https://blog.logrocket.com/dependency-inversion-principle-typescript | |
// all in one file | |
/** | |
* "reflect-metadata" | |
* This is a [Polyfill](https://developer.mozilla.org/fr/docs/Glossary/Polyfill) allowing | |
* to add the system of [reflection](https://fr.wikipedia.org/wiki/R%C3%A9flexion_(informatique)) | |
* to javascript. | |
* This is a necessary lib for all dependency injection questions (with "tsrynge") |