Skip to content

Instantly share code, notes, and snippets.

View jayisaac0's full-sized avatar

Joshua Isaac jayisaac0

View GitHub Profile
@jayisaac0
jayisaac0 / machineId.js
Created February 23, 2020 01:27 — forked from 19h/machineId.js
Generates IRC compatible unique machine-ID. Node.js (tested with 0.11.10)
var machineId = (function() {
var n = require("os").networkInterfaces(),
x = {};
return Object.keys(n).filter(function(v) {
return !n[v].forEach(function(v) {
v.mac.substr(0, v.mac.indexOf(":")) !== "00" && (x[v.mac] = 1)
})
}), Object.keys(x)
})().split(":").filter(function(v) {