If you ever need to pass a non-existent subdomain as an argument to another script, you’ll need this:
RewriteCond %{HTTP_HOST} !^www\.izeit\.nu$
RewriteCond %{HTTP_HOST} ^([^\.]+)\.izeit\.nu$
RewriteRule (.*) /home/hjennerway/izeit.nu/hosted/current/index.php?cal=%1
I used it for my LiveZeit project, which is a hosted version of iZeit. It takes a subdomain, then passes it to index.php as a GET variable. So if you go to blah.izeit.nu, you're really seeing izeit.nu/hosted/current/index.php?cal=blah. First you need to set up Wildcard DNS with your host so that every subdomain resolves to the same IP as the www subdomain, then add the lines above to a .htaccess file. The first line tells Apache to ignore the www domain, the second tells it to only look for subdomains without dots in them, then the third transparently redirects the subdomain to a script on your server. Then you can use PHP to take the query string from $_SERVER['REQUEST_URI'], explode it, and use it to set GET variables.
$qstring = explode("&",substr($_SERVER['REQUEST_URI'],strpos("?",$_SERVER['REQUEST_URI'])+1));
foreach($qstring as $gvar) {
list($k,$v) = explode("=",$gvar);
$_GET[$k] = $v;
}
I've covered remote virtual desktops in the past, but another one has sprung up and looks alot more promising. DesktopTwo is a desktop which runs in your web browser. The whole interface is coded in Flash, and it offers some interesting features. 1GB of free storage, an RSS reader and an impressive flash implementation of OpenOffice. It’s still in beta at the moment, but it’s free to sign up.

DesktopTwo [Via: Hongkiat]
I've just released iZeit v1.7, a calendar written in PHP. One of the things I added to this version was JavaScript forms created on the fly to replace image links. There was a problem recently with Google Web Accelerator, which preloaded all links on the current page so they'd load faster when they were needed. That might sound like a good idea, until you get a page full of delete links that use variables passed via the GET method. Creating a form on the fly and submitting it using POST looks nicer, is alot more secure and isn' subject to Google's interfering web accelerator. Instead of using the href of an anchor, you use an onclick event in the anchor instead.
‹a title="Delete Category" onclick="var f = document.createElement('form');
f.style.display = 'none'; this.parentNode.appendChild(f);
var h = document.createElement('input'); h.type = 'hidden'; h.name = 'act'; h.value = 'admin'; f.appendChild(h);
var h2 = document.createElement('input'); h2.type = 'hidden'; h2.name = 'setadmin'; h2.value = 'delcat'; f.appendChild(h2);
f.method = 'POST';
f.action = 'index.php';
f.submit();
return false;"›
‹img border="0" src="delete.gif" alt="Delete category" /›‹/a›
The one thing missing from Google was a catch-all feature, where you could specify a default address so that email sent to anything@yourdomain.com would go to an address you specify. That was until I found out they'd actually added the feature a few months ago. You can set it up under the 'Domain Settings' tab by clicking the 'edit' button next to 'Advanced Settings'. There's a chance you'll just get loads of spam by setting up a catch all address, but if you have a surname like mine which people never spell right, they can spell it however they want and the email will still get to me.
If you spend alot of time on forums, there’s an easy way to make a panel of clickable images which copy the location of the image to your clipboard so you can paste it onto a forum. It’s good for emoticons or anything else which takes a while to type out. You can arrange the images any way you want, then add the following piece of Javascript to the head:
<script type="text/javascript">
function toclip(iurl) {
if(document.getElementById('forum').checked) {
var imgtext = '[img]'+iurl+'[/img]';
} else {
var imgtext = '<img src="'+iurl+'" alt="" />';
}
if (window.clipboardData) {
window.clipboardData.setData("Text", imgtext); //IE
} else if (window.netscape) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var clip = Components.classes['@mozilla.org/widget/clipboard1'].
createInstance(Components.interfaces.nsIClipboard);
if (!clip) return;
var trans = Components.classes['@mozilla.org/widget/transferable1'].
createInstance(Components.interfaces.nsITransferable);
if (!trans) return;
trans.addDataFlavor('text/unicode');
var str = new Object();
var len = new Object();
var str = Components.classes["@mozilla.org/supports-string1"].
createInstance(Components.interfaces.nsISupportsString);
var copytext=imgtext;
str.data=copytext;
trans.setTransferData("text/unicode",str,copytext.length*2);
var clipid=Components.interfaces.nsIClipboard;
if (!clip) return false;
clip.setData(trans,null,clipid.kGlobalClipboard);
}
// alert("Following info was copied to your clipboard:\n\n" + iurl);
return false;
}
</script>
Then to copy the text to the clipboard when the icon is clicked, call the function with Javascript:
<a onclick="toclip('http://url//of/image.gif');"
href="#"><img src="image.gif" alt="Woot" /></a>
The function works fine with IE, but to get it working in Firefox, you need to allow Firefox clipboard access. Type about:config into the address bar, then 'signed' as the filter, and set the value to true.
I checked my server logs last night, just to see if there was anything interesting. I use two different domains, one for my blog and one for images I use on forums and the like, so the logs for mi6.nu, my images domain are like a breadcrumb trail of my last month's browsing. I was pretty surprised to see a few URLs I'd never heard of as the referrers. A finnish site about Lordi was one and MySpace.com was the other. I hate MySpace, and there's no way I'd have wasted my bandwidth hosting pictures for it. The images being linked was Contemplating Existence, a wallpaper I made last year. Some Idiot was using the image as his background. It's great that he liked my wallpaper but firstly it's my property, he can't use it without my permission, and secondly, it's over 200KB, and was loaded 350 times in December. That's 65MB of bandwidth I've paid for!
I decided to teach the leech a lesson using .htaccess (info in read more), which lets you serve up a different image for specified referrers. Inspired by a recent blog post I'd read, I thought the Goatse pic would be a good choice. For anyone that doesn't know, Goatse was a site available at the turn of the millenium which scarred millions of impressionable AOL kiddies. Now whenever someone from an external site tries to use one of those images, they'll get a nice surprise. Let that be a lesson to anyone else who's thinking of leeching my bandwidth!
Read more »
[kml_flashembed movie="http://www.youtube.com/v/G0smntbxyJ8" wmode="transparent" height="350" width="425" /]
This guy must have had way too much time on his hands, but it's still pretty impressive.
[Via: Schrankmonster]
An interesting to the miniatures competition at Craftster.org, others included a miniature room, wedding cake and Mona Lisa.

The burger was a little over one inch tall and about an inch wide.
Read more »

All actions are expressed by rewriting of a cell background color. Each one of cells as a dot, and move it by make cell's background color high-speed rewriting. Although I did not think it's possiblele, but now it's possiblele by the favor of the improvement in a performance of a personal computer. The window zoom is 10%, so the each cell can not be seen. But it is A CELL.”
Even works on Excel 2007, and there's a version of space invaders available aswell.
Download [Via: SchrankMonster]
The idea isn't particularly original, but the site, although still in beta, already has loads of video guides on how to make/do things. Some of them seem pretty boring (how to fit a mortice lock for example), but there are also guides on how to make cocktails.
VideoJug