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
#!/bin/sh | |
# dnsexit.sh - A DnsExit.com DDNS custom module for Synology DSM | |
# | |
# Author: | |
# Brian Schmidt Pedersen (http://blog.briped.net) | |
# Zinthose (https fork/edit) | |
# | |
# Version: | |
# 1.3.5 |
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
// Credits go to @Anjuna5 for original code: https://stackoverflow.com/a/39838257/9779148 | |
const mode = arr => [...new Set(arr)] | |
.map(value => [value, arr.filter((v) => v === value).length]) | |
.sort((a,b) => b[1] - a[1]) | |
.filter((v, i, a) => v[1] === a[0][1]) | |
.map(v => v[0]) | |
.sort((a,b) => a - b); |