A simple demonstration of HTTP/1.1 pipelining with netcat.<p>Retrieving 100s of small JPEG files with a single TCP connection. Here, 2 TCP connections for 141 files.<p>Splitting the output into image files and making a PDF from the images.<p>yy025 can be found here:<p>https://news.ycombinator.com/item?id=27178484<p>https://news.ycombinator.com/item?id=27180125<p>yy056 can be found here:<p>https://news.ycombinator.com/item?id=27769305<p><pre><code> # std utils: split, seq, od, tr, sed, flex
# common utils: nc, xxd, imagemagick
# simple utils made with flex: yy025, yy056
(export Connection=keep-alive
x1=http://www.minimizedistraction.com/img/vrg_google_doc_final_vrs03-
x2(){ seq -f "$x1%g.jpg" $1 $2;};
x3(){ yy025|nc -vvn 173.236.175.199 80;};
x2 1 100|x3;
x2 101 200|x3;
)|exec yy056|exec od -An -tx1 -vw99999|exec tr -d '\40'|exec sed 's/ffd9ffd8/ffd9\
ffd8/g'|exec sed -n /ffd8/p|exec split -l1;
for x in x??;do xxd -p -r < $x > $x.jpg;rm $x;done;
convert x??.jpg 1.pdf 2>/dev/null;rm x??.jpg
firefox ./1.pdf
</code></pre>
Note: The 82nd image is apparently corrupted which you will notice on page 82 of the PDF. However, this has no effect on readability of the slide.