Skip to content

Instantly share code, notes, and snippets.

I don't run when I code paolorossi

Block or report user

Report or block paolorossi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@paolorossi
paolorossi / angular-js-google-maps-markers-clustering-spiderfying.markdown
Created May 25, 2017
Angular.js - Google Maps - Markers clustering & spiderfying
View angular-js-google-maps-markers-clustering-spiderfying.markdown
@paolorossi
paolorossi / infinite-ssh.js
Last active Aug 29, 2015
Node.js: retry SSH connection after error (with timeout)
View infinite-ssh.js
// npm install ssh2
var Client = require('ssh2').Client;
var cmd = 'tail -f /tmp/foo.log';
var TIMEOUT = 5000;
var host = {
host: 'host.example.com',
port: 22,
username: 'username',
password: 'password'
View designer.html
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
@paolorossi
paolorossi / async-task-queue.js
Last active May 29, 2019
Javascript Queue for sequencing AJAX requests and other asynchronous tasks. Demo http://jsfiddle.net/rusci/26Dud/6/
View async-task-queue.js
// Queue class for serializing AJAX calls.
//
// Inspired by Raynos http://stackoverflow.com/a/4797596/1194060
//
// Queue has a public append method that expects some kind of task.
// A task is a generic function passed as callback.
// Constructor expects a handler which is a method that takes a ajax task
// and a callback. Queue expects the handler to deal with the ajax and run
// the callback when it's finished
View html5-video-streamer.js
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
You can’t perform that action at this time.