MiscPodcast
Code: , ,
Comments Off on MiscPodcast

I have some random episodes of podcasts laying around waiting to get listened to from podcasts I don’t (yet) care to subscribe to. Maybe they had an interesting guest or topic, or came recommended. These downloads will lay around on my computer for months because they’re not in my podcasting app, so they’re not really in my listening queue.

Continue this post

SPWA Week 2: Funding and Forms
Games: , , ,
Comments Off on SPWA Week 2: Funding and Forms

So Play We All is partly a motivation hack, with teammates/competitors and penalties to make sure we each put in time towards our games. Luke’s job sent him to a conference for almost all of the week, so he didn’t get to do any of his hours. He’s paying us both $20. To keep anyone from falling behind, we’ve tweaked the rules to say that anyone who pays the penalty for missed hours can make them up when they have the time.

Continue this post

PHP Hex Map Graphics
Code: , , ,
Comments Off on PHP Hex Map Graphics

This PHP code uses the GD functions to create hex map images (eg. for wargames).

Continue this post

Investigating Theme Spam
Code: , , , , ,
Comments Off on Investigating Theme Spam

If you’re interested in what spammers are up to these days, check out Snarky’s blog post Evil Eval() investigating the obfuscated spam code hidden in the new WordPress theme he downloaded.

I’d be really interested to see how many of the themes on various WordPress sites include function calls like eval, call_user_func, base64_decode, unpack, ord, chr, etc. as an indicator of hidden spam.

Building Clean URLs Into a Site
Code: , ,
Comments Off on Building Clean URLs Into a Site

I wrote about building a site with clean URLs, but that’s useless to you. No, you’ve got a creaking hulking monster of a site that coughs up URLs like “render.php?action=list_mailbox&id=42189”, was built “to meet an accelerated schedule”, and eats summer interns whole.

Continue this post

Developing With Evil
Code: , , , ,
Comments Off on Developing With Evil

Continue this post

Building a Site With Clean URLs
Code: , , ,
Comments Off on Building a Site With Clean URLs

As an aside in my post about Cambrian House I posted some code for making pretty URLs. A few people (no, not CH) have asked for a little more info, so I’ve written up an explanation of that code.

Continue this post

Pre-Cambrian House
Biz: , , , , ,
Comments Off on Pre-Cambrian House

I was poking around reddit and followed a link to CambrianCode.com, an all-Flash (ugh!) puzzle game. There’s a few of these “guess how to get to next level” games online and they all just annoy me. Yes, you’re so clever. No, I find patronization alluring. Yes, I’ll spend my time on this for no discernable reward.

The puzzle is run by Cambrian House, a mysteeeeerious stealth startup that has only a teaser page online. If there’s one thing that annoys me more than Flash puzzle-level games, it’s stealth startups.

So I went poking around some more and found a development copy of their website. And much to my surprise, it’s actually a darn cool business idea. So cool that after I wrote a whole “Mwaha, I’m raising the curtain early!” post I thought better of it and am only going to post this for now. It was clever and fun, there’s going to be a ridiculous amount of buzz around this company when it launches. And I got to register as user #9, which was damn funny when I noticed their “About Us” page lists 17 employees.

Confidential to CH in Calgary: it’s really tacky to litter your URLs with “.php” and get variables. Put the following in your .htaccess file and have index.php take apart the URL with the PHP code below and route to your different pages. URLs like “/community/member/Harkins” look much nicer than “/community/member-profile.php?users_id=9”. (Or ask me about mod_rewrite.)

<Location /secret_development_environment>
    Order Deny,Allow
    Deny from all
    Allow from 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 .cambrianhouse.com
</Location>

RewriteEngine On
RewriteCond    %{REQUEST_FILENAME}  -d [OR]
RewriteCond    %{REQUEST_FILENAME}  -f
RewriteRule     ^(.*)$  - [L]

RewriteRule ^(index.*) - [QSA,L]
RewriteRule ^([^.]*)$ /index.php [QSA,L]


function url_parse() {
$url = $_SERVER['REQUEST_URI'];

// we don't want to pass get vars or anchor tags on to the script
if (strpos($url, '?'))
$url = substr($url, 0, strpos($url, '?'));
if (strpos($url, '#'))
$url = substr($url, 0, strpos($url, '#'));

//remove leading slash and possible trailing slash, store in $url
if (substr($url, 0, 1) == '/')
$url = substr($url, 1);
if (substr($url, -1) == '/')
$url = substr($url, 0, -1);
if ($url == '/')
$url = '';
$url = explode('/', $url);

return($url);
}

Cambrian House house responded to me.