WordPress using wrong template after AJAX loading
A tricky problem with my AJAX-search function. Wordpress decided to use front-page.php for loading extra AJAX-content. The problem was that this styled the content in a different way than I needed. After identifying the root of the problem (which takes time!), I looked around for a neat solution. What I came up with was overriding ...
Meteor
I played around with meteor yesterday and I have mixed feelings. First of all, I was impressed that the whole plaform (it is not just a framework but an end-to-end development platform for all devices and browsers that matter because of the power of JavaScript). It worked out of the box on my Windows machine ...
jQuery UI style hack
Some of us still use jQuery UI :) In fact, it wasn't too bad, is still supported by all modern browsers, and performs reasonably well on mobile. There is one issue: the graphics look horribly 2010. jQuery UI offers a user interface to cherrypick your own CSS (it's great and kind of works: look at ...
Weekly changing random number
Simple task: How do we generate a random number that automatically changes every certain period of time. Of course, we use the week number when calculating the random number. Also, we have to cache a "large integer" that will not change until the end of the week to get a deterministic random-enough number. The result ...
More.less
@base: 663333; @complement1: spin(@base, 180); @complement2: darken(spin(@base, 180), 5%); @lighten1: lighten(@base, 15%); @lighten2: lighten(@base, 30%); @lighter1: lighten(spin(@base, 5), 10%); @lighter2: lighten(spin(@base, 10), 20%); @darker1: darken(spin(@base, -5), 10%); @darker2: darken(spin(@base, -10), 20%); .opacity (@opacity: 0.5) { -webkit-opacity: @opacity; -moz-opacity: @opacity; opacity: @opacity; } .border-radius (@radius: 5px) { -webkit-border-radius: @radius; -moz-border-radius: @radius; border-radius: @radius; } ...