Skip to content

Instantly share code, notes, and snippets.

#!/bin/env python
from smtpd import SMTPChannel, SMTPServer
import asyncore
class LMTPChannel(SMTPChannel):
# LMTP "LHLO" command is routed to the SMTP/ESMTP command
def smtp_LHLO(self, arg):
self.smtp_HELO(arg)
/*
* Copyright (C) 2006, 2008 Valery Kholodkov
* Client body reception code Copyright (c) 2002-2007 Igor Sysoev
* Temporary file name generation code Copyright (c) 2002-2007 Igor Sysoev
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include <nginx.h>
On the last machine in the chain:
nc -l 1234 | pigz -d | tar xvf -
On each intermediate machine, you use a fifo to copy the data to the next machine as well as decompressing.
mkfifo myfifo
nc $NEXT_SERVER 1234 <myfifo &
nc -l 1234 | tee myfifo | pigz -d | tar xvf -
@perpetual-hydrofoil
perpetual-hydrofoil / parallel.js
Last active October 9, 2018 15:22 — forked from paul/parallel.js
fixed typo in $.each statement. (otherwise each url will be a numeral: 0,1,2..)
var results = {};
var requests = 0;
var urls = ["values/1", "values/2", "values/3"];
$.each(urls, function(idx, url) {
$.getJSON(url, function(data) {
results[url] = data.value;
++requests;