Skip to content

Instantly share code, notes, and snippets.

View razouck's full-sized avatar
💭
I may be slow to respond.

Razouck razouck

💭
I may be slow to respond.
View GitHub Profile
@razouck
razouck / hosts
Created December 15, 2022 13:13
OpenSUSE default hosts file.
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#
let a = [1, 2, [3, [4, [5, [6], [7, [8]]]]]];
function brainDeadDeepFlat(arr)
{
return Array.isArray(arr)
? arr.reduce( (arr, e) => arr.concat(brainDeadDeepFlat(e)), [] )
: [arr];
}
function normalBrainDeepFlat(arr)