Share behavior between your Rails tests using modules
If you’re using the Minitest framework with Rails, you can share common behavior between tests using Ruby modules. Find out the simple setup to make it work.
If you’re using the Minitest framework with Rails, you can share common behavior between tests using Ruby modules. Find out the simple setup to make it work.
Typekit is a quick and easy way to add quality Web fonts to your site, but it can also significantly impact page load times. “Ain’t care: I want cool fonts!” you say. Okay, if you’re willing to sacrifice a little speed for that, it might be a reasonable trade-off for your purposes.
Yeah, you wish this was about beer. So you’re using some trick Web fonts for your site or app. It looks awesome in development. Yay. You push to production, where your assets are all hosted on a CDN and suddenly your fonts stop working on Firefox and probably Internet Explorer (9+), too. You see crappy little squares where… Read more »
JSONP is a way to fetch JSON data from a different domain, often in an asynchronous way, but without being restricted by the browser’s same-origin policy like you would be with XMLHttpRequest. But perhaps you only know it via a library like jQuery, which auto-magically handles JSONP URLs. Here’s a simple JSONP example and breakdown to show what’s really going on behind… Read more »
I added a handy Google Slide Show widget to my site, which pulls images from an RSS feed from my photo site. Radical like Zinka, but there was no photo randomization. With a little 1337 h4x0ring I was able to do it. You, too, can get the chicks.