While experimenting with canvas tag today I needed a good way to take a hex value and convert it to RGBA. I went searching and found some solutions, but nothing that really seemed complete. I wanted a single function that didn’t call eval or pollute the environment with globals… Maybe I could have looked harder but here is what I came up with.
I know hex values don’t include the alpha value in rgba – this function gets you the RGB values so you can mix in the alpha value.
If you have not heard of unicorn and you actively develop ruby applications for the web. It is no doubt well worth your time to check it out. Github has a very good write up about unicorn that is definitely worth reading. Let me first show you this quick video of deploying to our yet to be released client site while sieging.
If you are like me and always want to test the performance of your sites before releasing them to the public eye and you have an interest in publishing sitemaps to google and friends. This handy ruby script might be just the thing for you.
Assuming you already have your sitemap.xml file, if not try googling…
Next run the ruby script, given the sitemap.xml file as the first argument:
Okay, I really liked this theme last year when I installed it but today I decided it was time for a change… Well a minor change, I hacked up the theme to support a variable width grid. Setting a min-width and width:%% to allow the content area expand.
Alright, I worked on a solution today to follow up on my earlier post… This is very raw, but showing some good signs of working. I’ve been testing locally against memcached. One concern, I have with this solution is the content_for block is cached in a separate key, if the action key expires after the content_for key, then some requests might render without the content_for content… Perhaps, before rendering the action from cache we need to check that all fragments are available? This could also make it possible to do a multi get from memcached as well? Let me know what you all think. Read more…
Today, I realized that using content_for blocks as nice as they are make it much harder to cache. Typically, I won’t cache the layout for my actions so I would end up with a caches_action expression like the following:
Recent Comments