Skip to content

Instantly share code, notes, and snippets.

View Anemy's full-sized avatar
🍍
github.com/mongodb-js/compass and artsable.com

Rhys Anemy

🍍
github.com/mongodb-js/compass and artsable.com
View GitHub Profile
[
{
$collStats: {
storageStats: {},
},
},
{
$addFields: {
// The unscaled avgObjSize for each shard is used to get the unscaledCollSize because the
// raw size returned by the shard is affected by the command's scale parameter.
@Anemy
Anemy / irelandCountiesToProvincesMap.js
Created June 4, 2018 16:15
Ireland counties to provinces map
const irelandCountiesToProvincesMap = {
'IE-CW': 'IE-L',
'IE-CN': 'IE-U',
'IE-CE': 'IE-M',
'IE-CO': 'IE-M',
'IE-DL': 'IE-U',
'IE-D': 'IE-L',
'IE-G': 'IE-C',
'IE-KY': 'IE-M',
'IE-KE': 'IE-L',