Skip to main content

Posts

Showing posts from March, 2011

Resuming scp

I was transferring a file from one system to another at work with scp when the connection dropped. It was a substantially sized file and I didn't want to start the transfer over again, but unfortunately scp doesn't support resume. That's when I remembered rsync. With rsync I was able to continue the transfer where it left off, and afterward I had the idea to set the following alias in my .bashrc file.
alias scp='rsync -vPe ssh'Now when I transfer files with scp, I'm really using rsync and I don't have to worry about flaky network drops.

Creepy JavaScript Tracking

I recently began allergy shots so my new Monday morning routine includes me sitting in a doctor's office for 30 minutes (I must wait after receiving the shots and be checked by a nurse to make sure there was no reaction). With nothing else better to do while I waited last week, I started playing around with some JavaScript. This is what I came up with:
<html> <head> <title>Test</title> <script type="text/javascript"> window.onload = function () { var mX = 0,  mY = 0, sX = 0,  sY = 0, queue = [], interval = 200, recIntv = null, playIntv = null, b = document.body, de = document.documentElement, cursor = document.getElementById("cursor"), record = document.getElementById("record"), play = document.getElementById("play"); window.onmousemove = function (e) { e = e || window.event; if (e.pageX || e.pageY) { …