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 http = require('http'); | |
const net = require('net'); | |
const PORTS_TO_SCAN = [80, 443, 22, 21, 8080]; | |
const scanService = (i, port) => new Promise((resolve) => { | |
const ip = `192.168.1.${i}`; | |
const socket = new net.Socket(); | |
socket.setTimeout(4000); | |
socket.on('connect', () => { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style> | |
html, | |
body { |
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 Person (userName) { | |
this.userName = userName; | |
this.present = function () { | |
console.log(`Hi, I'm ${this.userName}`); | |
} | |
this.greet = function(person){ |
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 | |
/* 1.1.1 */ | |
/** | |
* Single class for creating, generating and evaluating HTML forms. | |
*/ | |
class qbWebForm | |
{ | |
public $id; |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Database Administration</title> | |
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2"> | |
<style> | |
body {width:96%; margin:auto; margin-top:10px; border:auto; padding:auto; font-size:13px; color:#005000; text-align:center;font-family:Helvetica,Arial;background-color:#ffffff;} | |
a {font-weight:bold; text-decoration:none; color:#005000; } | |
a.hover {font-weight:bold; text-decoration:underline; color:#005000; } | |
a.active {font-weight:bold; text-decoration:none; color:#005000; } |
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 | |
$imageFolder = '.'; | |
$extensions = 'jpg,JPG,JPEG,jpeg,png,PNG'; //can be just 'all' as well. | |
$width = 150; | |
$height = 150; | |
/** | |
* Filters out thumbnails. | |
* |
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
module.exports = function stringifyFunction(obj) { | |
return JSON.stringify(obj, (key, value) => { | |
if (typeof value === 'function') { | |
return `[Function ${value.name}]`; | |
} | |
return value; | |
}, ' '); | |
}; |
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
module.exports = function stringifyCircular(obj) { | |
const cache = []; | |
return JSON.stringify(obj, (key, value) => { | |
if (typeof value === 'object' && value !== null) { | |
if (cache.indexOf(value) !== -1) { | |
// Circular reference found, discard key | |
return undefined; | |
} |
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
/* | |
npm i -S webpack@1 html-webpack-plugin clean-webpack-plugin extract-text-webpack-plugin@1 webpack-livereload-plugin | |
npm i -S css-loader file-loader postcss-loader@1 style-loader sass-loader node-sass autoprefixer | |
npm i -S babel-core babel-loader babel-preset-es2015 | |
npm i -S template-minify-loader | |
npm i -S eslint-plugin-react preact babel-plugin-transform-react-jsx | |
npm i -D eslint eslint-config-qb serve-local | |
*/ |
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
/* eslint no-inline-comments: 0 */ | |
/* eslint line-comment-position: 0 */ | |
/* eslint no-unused-expressions: 0 */ | |
// Object.getOwnPropertyNames(Date); | |
Date.length; // 7 - number | |
Date.name; // Date - string | |
Date.arguments; // null - object | |
Date.caller; // null - object |
NewerOlder