This file contains hidden or 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
<?php | |
namespace WebExtractor\Test; | |
use WebExtractor\StashDriverFactory\StashDriverFactory; | |
/** | |
* Class StashDriverFactoryTest | |
* |
This file contains hidden or 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
const dima = "cool man"; |
This file contains hidden or 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
function detectLocalIps() { | |
const networkInterfaces = require('os').networkInterfaces(); | |
return Object.keys(networkInterfaces).reduce((acc, interfaceKey) => { | |
const filterIpsList = ['127.0.0.1', '::']; | |
const interfaceDetails = networkInterfaces[interfaceKey]; | |
for(let i=0; i<interfaceDetails.length; i++) { | |
const locator = interfaceDetails[i]; | |
if(locator && locator.hasOwnProperty('address') && locator.hasOwnProperty('family') && locator.family === 'IPv4') { | |
let isAllowed = true; | |
for(let j=0; isAllowed && j < filterIpsList.length; j++) { |
OlderNewer