Sunday, December 11, 2011

staticloud.com

I used to use Dropbox for instant static hosting (experiments and such), but now they serve xhtml files only; any .html causes 404.
Today I found a staticloud.com, which provides static hosting at almost the same level of simplicity as DropBox. You just dragdrop your zipped files and choose subdomain, and after couple of seconds (watching upload bar) yoursite.staticloud.com is up and running. No ads and 1GB bandwidth per month should be enough for just about any static site.
They use Amazon's cloud. Great job!

P.S. There is similar tool: coralrift.com

Sunday, August 21, 2011

GNU (and others) make in web-development

make can be very useful both in combining static files together and squeezing them. I've found detailed and complete manual on this: Website builds using Make. While Makefile syntax may seems confusing and arcane at first glance, basically it is just shell script with some addition to manage dependencies.

Since Makefile basically is shell script, you can use watever commandline-fu you learned. There is one thing to consider though: for loops.
for i in $(my-src-files) do; echo $$i >> $(my-dest-file); done

It takes me couple of hours to realize that one must use $$i when referencing loop variable instead of just $i like in plain shell scripts.

Sunday, April 24, 2011

Google Chrome's requestFileSystem API

I've needed to dump database from Chrome extension and walked to requestFileSystem API. This API described quite detailed on HTML5 Rocks, but it gave no idea where my files are located on my hard drive. Process Monitor gaved me directions, and there it is. For each application, would it be site or extension, Google Chrome creates subdir in your %LOCALAPPDATA%\Google\Chrome\User Data\Default\FileSystem (on Windows (I'll give path for Linux later)). This subdir is named after application's URL, including protocol with slashes and colons replaced with underscores. For html5test.com it looks this way: http_www.html5rocks.com_0 Inside URL-named folder one can find one or two folders: Persistent or Temporary or both, which depends on type of access given application used. Inside each of them there is a directory with some kind of hash in name. And that hashed-name directory is root directory for your application's filesystem.

Thursday, April 21, 2011

e-mail validation

Developers should always remember that e-mail adressess may contain dot before @. For example, one of my e-mails is doctor.hogart@gmail.com. I've created it in late 2004 and I periodically still got messages like „invalid e-mail“.