Skip to content

Instantly share code, notes, and snippets.

View danypype's full-sized avatar

Daniel López danypype

View GitHub Profile
@danypype
danypype / main.py
Created October 28, 2022 22:09
Simple python port scanner
from multiprocessing import Process
import argparse
import socket
import time
import math
def is_port_open(ip_address, port, timeout=1):
try:
socket.create_connection((ip_address, port), timeout).close()
@danypype
danypype / package.json
Last active August 29, 2015 14:07
Node.js' net socket memory leak?
{
"dependencies": {
"heapdump": "^0.2.10"
}
}
@danypype
danypype / gist:fd43628d93967ae22c13
Created August 28, 2014 18:00
requestThrottler
var requestThrottler = require("request-throttler")({
concurrency: c,
executionsPerRound: epr,
roundDuration: millis
});
//Use case 1
requestThrottler(reqOptions, function (error, response, body){
//...
});
@danypype
danypype / index.html
Last active December 13, 2015 23:08
A CodePen by Daniel López. Using model aggregation and inheritance in AngularJS
<!DOCTYPE html>
<html>
<head>
<script src='http://code.angularjs.org/1.1.2/angular.min.js'>
</script>
</head>
<body ng-app='App'>
<div>
<h2>Agregation</h2>
<h3>ClassB</h3>