Navigation
Lazy Load Pattern with Asyncronous Javascript
2011-08-25 07:27:49add function to queue of onload event and asyncronously implement lazy load
(function() { function async_load(){ var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'http://yourdomain.com/script.js'; var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); } if (window.attachEvent) window.attachEvent('onload', async_load); else window.addEventListener('load', async_load, false); })();
software-design
2011-01-30 17:34:38There are two ways of constructing a software design. One way is to make it so simple there are no obvious deficiencies. And another way is to make it so complicated that there are no obvious deficiencies. -C Hoare
spree on linux
2011-01-22 11:07:28- Ruby 1.9.2 and Rails 3.0.1
- Spree, Rails, and Ubuntu
- rails new boutique-shop
- gedit Gemfile
- gem 'spree', :git => 'git://github.com/railsdog/spree.git'
- bundle install
- rails g spree:site
- rake spree:install
- rake spree_sample:install
- rake db:bootstrap
- rails s