lighttpd, allow “Access-Control-Allow-Origin:*” headers on the server status page

Maybe there’s someone out there who needs to read the output of lighttpd’s status for monitoring purpose like me tonight, and also, like me, you want to do this using JavaScript, but your browser gives you this nasty error: XMLHttpRequest cannot load http://otherSubdomain.server.com/lighttpd-status-url-you-have-configured. Origin http://requestingSubdomain.server.com is not allowed by Access-Control-Allow-Origin. lighttpd allows you to add […]

twitterAutoLinks: jQuery extension to replace twitter @names for links to their respective pages.

Save the following on a .js file, preferably named jquery.twitterAutoLinks.js [javascript] /** Auto replace all Twitter nicknames for links */ $.fn.twitterAutoLinks = function() { return this.each(function() { var html = $(this).html(); $(this).html(html.replace(/B@([w-]+)/gm, ‘<a href="http://twitter.com/$1" target="_blank">@$1</a>’)); }); }; [/javascript] Usage After importing the jquery.twitterAutoLinks.js file (make sure it’s after you’ve imported jquery itself), you’ll use the […]