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
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++) { |
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
const dima = "cool man"; |
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
<?php | |
namespace WebExtractor\Test; | |
use WebExtractor\StashDriverFactory\StashDriverFactory; | |
/** | |
* Class StashDriverFactoryTest | |
* |
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
const express = require(‘express’); | |
const app = express(); | |
const http = require(‘http’).Server(app); | |
const io = require(‘socket.io’)(http); | |
// middleware for static processing | |
app.use(express.static(__dirname + ‘/static’)); | |
// web socket connection event | |
io.on(‘connection’, function(socket){ | |
console.log(‘connection’); | |
}); |
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
@set @x=0; /* | |
@echo off | |
SetLocal EnableDelayedExpansion | |
ver |>NUL find "6." && if "%1" neq "Admin" ( | |
cscript.exe //nologo //e:jscript "%~f0" | |
Exit | |
) | |
:begin |
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
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
<!-- Armor-games --> | |
<ins class="adsbygoogle" | |
style="display:inline-block;width:468px;height:15px" | |
data-ad-client="ca-pub-0350114752821968" | |
data-ad-slot="1243309512"></ins> | |
<script> | |
(adsbygoogle = window.adsbygoogle || []).push({}); | |
</script> |
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
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
<!-- Armorgames, 336x280 --> | |
<ins class="adsbygoogle" | |
style="display:inline-block;width:336px;height:280px" | |
data-ad-client="ca-pub-0350114752821968" | |
data-ad-slot="3675840310"></ins> | |
<script> | |
(adsbygoogle = window.adsbygoogle || []).push({}); | |
</script> |
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
{ | |
"id": 2, | |
"name": "Death Star", | |
"thumb": "/uploads/slides/thumbs/1131.png", | |
"onCreated": 1398222222, | |
"onUpdated": 1398249206, | |
"onPublished": 1398258112, | |
"author": "Oleksandr Knyga", | |
"editor": "Marjam Holy", | |
"startState": 11, |
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 | |
DateDir=`date +"%d.%m.%Y"` | |
createdir() | |
{ | |
if [ ! -d $1 ] | |
then | |
mkdir $1 | |
fi | |
} |
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
var request = "http://freelansim.ru/freelancers?freeonly=true&page=<?%page%?>&q=ruby+on+rails", | |
pcount = $('.gap').next().text() || 5, | |
emails = []; | |
var stat = { | |
cur: 0, | |
total: 0, | |
left: function() { | |
return this.total - this.cur; | |
} | |
}; |
NewerOlder