Impressive JavaScript PC Emulator

Fabrice Bellard has written an impressive PC emulator that actually emulates a PC with a 32 bit x86 compatible CPU. This is some really imaginative use of pure JavaScript which I’m sure no-one would have every dreamed of as it allows you to run a virtual instance of Linux inside a browser window!

It currently only works in Google Chrome 11 or Firefox 4 as it uses part of the WebGL HTML5 spec that Safari hasn’t implemented yet but is definitely worth playing around with. You can even compile C files!

Email yourself a log file

If you ever find yourself deep within the console of a remote Unix/Linux server, locked down by a thousand firewalls and in quick need of saving a log file for later analysis then your best friend could be the mail command! Just type the following, replacing [email protected] with your email address, naturally ;-)

cat secret.log | mail -s "Secret API Log File" [email protected]

Get emailed when uploads complete

Sometimes I have to send a client a really large file or app that’s too large to post to Basecamp. The solution is to upload to a web server over night and email the client a link when it’s done. Not wanting to tie my laptop down overnight here is a great solution that emails you when it’s done.

Lets say your file is called NinjaApp-1.0.ipa and you use SSH/SFTP on your server to copy everything…
1. Drop your file onto a spare Mac or server.
2. Type the following into a terminal window:

scp NinjaApp-1.0.ipa [email protected]:/var/www/downloads/.
&& echo "Upload done" | mail -s "Upload Complete" [email protected]

That’s it! You’ll get an email when it’s done.