$ ant -projecthelp | grep -e '^\ .*'
$ ruby ../svn_find_deletion.rb
Usage: ruby ../svn_find_deletion.rb DELETED_FILE_PATH
Find the revision when a certain path was deleted.
$ ruby ../svn_find_deletion.rb a_file
/stuff/a_file deleted in revision 6
To recover it: svn copy -r5 file:///home/dev/repos/stuff/a_file a_file
http://enkp.bingodisk.com/public/svn_find_deletion.rb
$ echo hello | ssh remote.server "cat > file"
$ ssh remote.server "cat file"
hello
Cool, non? Our practical use for this was using 7zip to compress a large data file (several gigs of csv basically) locally and have it be streamed up to a server on EC2, rather than compressing the entire file then scp’ing the result up.
$ 7z a dummy -so -tgzip big_huge_data.csv | ssh remote.server "cat > big_huge_data.csv.7z"
The only problem is that you *must* specify gzip compression (or at least not use 7zips default compression algorithm).
The scenario: there are services (such as subversion) at your office/university that you can access from its internal network, but you can’t access remotely. But you do have external SSH access to an internal machine.
If you were internal, you might check out a project like this:
$ svn co http://internal.svn.host/my_project/trunk
Using ssh, it’s possible to tunnel connections, to ports on your local machine, through to servers on the other end of your ssh connection. For example:
$ ssh -L 1234:internal.svn.host:80 external.ssh.server
This will route connections to port 1234 on the local machine, to port 80 on ‘internal.svn.host’ as seen by ‘external.ssh.server’. As long as that ssh connection is maintained, you can check out and work on a project:
$ svn co http://localhost:1234/my_project/trunk my_project