Got Something in Your Shirt There

Hey, my product is down here!

Hey, my product is down here!

A girl named JenaĆ© is offering to wear your startup’s shirt for a day, plus unbox your product on video and talk about it. She will also post about your product and company via Twitter, YouTube, and other so-so media sites for a fee of $75.

As long as you don’t mind someone who is blatantly a paid shill talking about your product in an annoyingly vapid valley-girl tremolo, this could be a great marketing opportunity. For your company, I mean. On her end, she gets a free shirt, some swag, probably advertising revenue in the future, and $75 to boot. All this for a girl who’s only moderately attractive (it sounds shallow, but no more shallow than “buy a spot on my chest”).

Link featured breathlessly via TechCrunch (I think Michael Arrington is crushing)

Movable Type Installation on Windows Server 2003

Wow, what a pain in the ass. I’m glad I didn’t personally pay for this software. I thought this was yet another PHP content management system.

Nope, it’s Perl.

To hopefully save someone from searching all over the web and back, here are the problems I encountered while installing. This guide assumes a semi-proficient knowledge of IIS configuration.

Install ActivePerl

First off, make sure you install ActiveState’s ActivePerl on your server. Manually configuring Perl is not something I’d care to dive into. If that’s your bag, go to CPAN (and why the hell are you reading this guide?).

Using the IIS Manager, navigate to your website and choose “Properties”. Under the “Home Directory” tab, click the “Configuration” button.

In the Application Configuration window, click the “Add” button.

Use the following values in the Extension Mapping dialog:

Executable: C:\Perl\bin\perl.exe "%s" %s
Extension: .cgi
Verbs: Check “Limit to:” and enter GET,HEAD,POST
Uncheck the box labeled “Verify that file exists” (this will speed execution on scripts)

Next, select the “Web Service Extensions” item on the left of the IIS Manager (at the same level as “Web Sites”). Select “Perl CGI Extension” and click the “Allow” button.

I already had PHP installed on this server, so I’m skipping that step for this guide. PHP is far less tricky to install, anyway, and there are extensive guides for this already.

Fix Shoddy Installation Procedures

When navigating to my Movable Type directory, I immediately encountered the error “CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers.”

Bad CGI application, bad! Smack it on the nose with a rolled up magazine!

First off, you should run the mt-check.cgi script to make sure everything’s on the up-and-up. If the script runs successfully, you’ve successfully installed and configured ActivePerl. Yay, you’re halfway (yes, halfway) there!

Near the top of this page, you should see the following:

Current working directory: [path]
MT home directory: [different path]

The MT Knowledge Base says to download this modified Bootstrap.pm file, and replace it with the version on your server. I honestly don’t know what’s different about it, or why they couldn’t include it with the installation, or even if it does anything different. Mindlessly obey.

The same page also advises to “Create a new “virtual directory” under IIS which points to the physical directory where the Movable Type CGI files are located (i.e., the “MT home directory” mt-check.cgi reports)” That explanation is freaking stupid. What it should tell you is “Do not install MovableType directly into the folder you wish to present to the world.” As in, I moved the entire thing to /cgi-bin/ and created a virtual folder named “blog” under the root folder pointing to /cgi-bin/. Your CGIPath variable in mt-config.cgi should match your virtual folder name (like http://www.example.com/blog/).

Install MySQL Driver

Oops, now navigating to the blog URL results in an error saying that the MySQL driver is missing (sharp readers will notice this was missing in mt-check.cgi as well, I did not). On your server, run the ActiveState Perl Package Manager, which should be in your Start menu. If you scan through all packages, you’ll notice a DBD-mysqlPP module. This will not work, as far as I know. You need to add another repository source to get the actual module you need.

In PPM, go to Edit > Preferences, then go to the “Repositories” tab in the preferences window. Add the CPAN repositories to its sources by either selecting “uwinnipeg” from the “Suggested” list, or do what I did manually. Enter “CPAN” for name, and http://cpan.uwinnipeg.ca/PPMPackages/10xx/ to the location box, then click the “Add” button. You should now have DBD-mysql available for installation. Install it.

That should be it! As far as configuring MovableType goes, that’s where I get off, because this installation was for a client who already knew how to use it, and already had his login information in the database (this was a server move).

Good luck!

Bunnies and Rainbows

Now that the presidential election is over, there’s no more point to political posts. Consider my opinion on the matter closed from here on out. Nothing but bunnies and rainbows from here on out.

Obama’s Tech Transition Team

Headed by Google.org’s Sonal Shah and Julius Genchowski, who served as chief counsel to former Democratic FCC Chairman Reed Hundt, have been selected to head up Barack Obama’s technological transition team.

Genachowski is a co-founder and managing director of Rock Creek Ventures, and is a founding partner of LaunchBox Digital, an early-stage investment firm based in Washington, D.C. According to the Washington Post, he also helped emphasize the importance of technology during Obama’s campaign.

We keep hearing that things are going to change. Now you can see some of that change for yourself. Welcome to a more transparent government.

www.change.gov

It might be slammed right now, having been linked from Hacker News, and likely is in the front page queue for Slashdot.

Despicable in Battle, Noble in Defeat

"I'll still be an asshole...er, maverick."

'I'll still be an asshole...er, maverick.'

John McCain gave his concession speech last night in Arizona. It was noble, humble, and sincerely congratulatory. It reminded me of a John McCain that I remember from years ago.

John McCain was a man whose integrity I once admired, but not anymore. After watching him repeatedly sling mud, including implying that his opponent was a socialist, I find it difficult to muster even an iota of respect for him. The one moment I held out hope that I would still be able to respect McCain was when he seized the reins on his runaway fearmongering. When he corrected audience members and told them, “you have nothing to fear from an Obama presidency,” and took the microphone from an old lady claiming Obama was a Muslim and corrected her, I thought I could respect him again.

The next day it was right back to scare tactics.

McCain’s ideals are outdated, and his party loyalty is far too strong. While it looked like he was genuinely uncomfortable at times smearing his opponent during the campaign, he did almost nothing to stop it. While he played up Obama’s win at his concession, he did not apologize for his campaign at all, though a presidential rally in a concession speech is probably not the best place for that.

So, congratulations, McCain. You’ve managed to make yourself not look like a complete asshole. Now I just have to listen to people call the leader of this country a socialist who hangs out with terrorists for the next four years. Thanks a lot.

ASP.Net MVC

If you’re using IIS and ASP.Net…I fart in your general direction. I discussed this URL-rewriting feature (Using a single file to handle all requests) on one of our portals with our lead .Net developer, and his response was a gruff, “well, if Apache can do it, I can do it…” A week later, I am asked which config file I want to store my URL entries in.

Sigh…

The whole point of URL rewriting is so that you don’t have to do stupid crap like “update another file that contains information about the file you just added/deleted.” Then a few days later he tells me that it can happen, but the URLs must be in the format /info/page-name.aspx. Not that I mind too much, as it’s basically what I asked for, but it doesn’t seem that hard. I mean, I’m not an expert ASP.Net developer. I don’t even like
ASP.Net. This is now another reason added to the many reasons I don’t like it.

A few days ago, I heard about ASP.Net MVC (via Scott Gu’s blog, no link love for Microsoft, because their description doesn’t say anything meaningful).

It includes a very powerful URL mapping component that enables you to build applications with clean URLs.

Clean URLs. Like the one at the top of this page. Like the ones you see on CodeIgniter, WordPress, ExpressionEngine, and most other PHP/Apache sites out there. My guess is I’ll get one more week, maybe two before we’re rewriting with ASP.Net MVC.

.htaccess Snippets

Here are some .htaccess snippets I’ve had to use, and hopefully someone will find them useful.

Moved from one URL to another: My old blog url used to be verbose.pixelbath.com, and before that was pixelbath.com/verbose. Setting aside the notion that I move my blog around too much, the following snippet…

RewriteEngine on
RewriteCond %{HTTP_HOST} ^verbose [NC]
RewriteRule ^(.*)$ http://www.pixelbath.com/blog/ [R=301,L]

…which means any hostname with ‘verbose’ will be redirected to the main blog URL. Useful because many sites had me linked to the old blog, and I didn’t want to break their links too badly. Nothing fancy, so please note that this does not transfer url parameters. It only redirects requests with the single word ‘verbose’ to the main blog URL.

Using a single file to handle all URL requests: If you’ve used almost any PHP CMS or MVC framework such as CodeIgniter or CakePHP, you’ve probably used something like this for “search friendly URLs”:

RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.+) /blog/index.php [L]

What this does is start from the /blog/ folder, and handle any requests under that. The first RewriteCond sets our rule to not apply to any physical files matching the request, and the second does the same for physical directories.

Once it passes the two conditions (a request in /blog/ that is not a physical file or directory), it goes to the RewriteRule, which simply takes all matching requests and redirect them internally to /blog/index.php. This is not a browser redirect, so the user will still see the URL the way they found it, something like http://example.com/blog/archive/foo. I use this technique on the comics pages by parsing the URL segments into comic and page requests.

Stop image and/or content hotlinking: Some netizens are either not savvy with the way the Internet works, or don’t give a crap because idiocy prefers the low-hanging fruit. Either way, I’ve actually got a few snippets for this purpose.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?myspace.com [NC,OR]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?blogspot.com [NC]
RewriteRule ^.*$ http://www.yourdomain.com/ [R,L]

The preceding snippet will block specific websites and their subdomains from hotlinking from your site, but will allow any other site not specified in your .htaccess file to do so. If you’d prefer to stick another image in place of the hotlinked one, this is particularly adviseable when you, (often with amusing results):

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yourdomain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/goatse.jpg [L]

This one will take any request with a referer not originating from your domain, or blank referers (because some users do legitimately blank their referer string), and redirect them to an image elsewhere on your site. This will work “inline” and display whichever image you specify on outside sites.

If you’d prefer to be plain and simple though, you can just set HTTP code 403 (Forbidden) on any image for any of the rewrites in this section. Simply replace the RewriteRule of each with:

RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]

Which simply sets any request for any image to 403 (Forbidden). Obviously, it should be used in conjunction with RewriteConds.

Political Rant, Part Two

Originally two draft posts, one from 2007, and one a couple months ago. I had been sent this chain letter twice, but decided not to send these to their original addressees, but combine the two response emails into one post. Please to enjoy:

I agree with most of this letter, except:

“Is this the same president who guided the nation in the dark days after 9/11?”
No, this is the same president who told the intelligence community to find information linking Iraq to 9/11 so he could invade the country.

“The president that cut taxes to bring an economy out of recession?”
The economy ebbs and flows; presidents and taxes have little actual causal effect on it. Cutting the death tax doesn’t count, as that tax really applies to rich people.

“Could this be the same guy who has been called every name in the book for succeeding in keeping all the spoiled ungrateful brats safe from terrorist attacks?”
Keeping us safe by invading other countries on false pretenses to serve his own self-interest? I’m sure that will keep us safe.

“Just ask why they tried to allow a murderer like O.J. Simpson to write a book about how he didn’t kill his wife, but if he did he would have done it this way……Insane!”
I’m sorry, I thought this was America, the one with freedom of speech. I’m not condoning the book, but he’s free to express his thoughts however he wants. Besides, aren’t you innocent until proven guilty?

Regardless of individual points of contention, my personal feeling of dissatisfaction (I am not an unhappy person) with this country is with the current presidential administration, particularly its views on foreign policy. I fear that our involvement in a civil war that doesn’t concern us, the way we are playing both sides, will only ensure more attacks on this country. We weren’t attacked because we’re “spoiled brats.” We were attacked because of our constant involvement in the Middle East, and our economic extortion of developing nations.

From John Perkins’ book Confessions of an Economic Hit Man (which I highly recommend):

Today we see the results of this system run amok. Executives at our most respected companies hire people at near-slave wages to toil under inhuman conditions in Asian sweatshops. Oil companies wantonly pump toxins into rain forest rivers, consciously killing people, animals, and plants, and committing genocide among ancient cultures. The pharmaceutical industry denies lifesaving medicines to millions of HIV-infected Africans. Twelve million families in our own United States worry about their next meal. The energy industry creates an Enron. The accounting industry creates an Andersen. The income ratio of the one-fifth of the world’s population in the wealthiest countries to the one-fifth in the poorest went from 30 to 1 in 1960 to 74 to 1 in 1995. The United States spends over $87 billion conducting a war in Iraq while the United Nations estimates that for less than half that amount we could provide clean water, a equate diets, sanitation services, and basic education to every person on the planet.

And we wonder why terrorists attack us?

Don’t get the wrong idea. I love this country, and am grateful that I live in a first world country with all the benefits and rights that I have. I am not opposed to the bravery of soldiers executing their mission, but that’s what it is: a mission. It’s their job. However, the person leading the current charge, their commander-in-chief, is the epitome of what exactly is wrong with this country. A group of out-of-touch rich old guys attempting to become more rich by plundering anything and everything they can while gaining support by using fear against harm and specific groups of people. That is the true definition of terrorism. Look it up.

Complaining about the direction our country is heading is not unpatriotic. It’s what defines our country as a democracy, and a dissenting voice is the definition of patriotism: wanting the best for your country. The beauty of our system is that we don’t have to like our current officials, and can change them out without having an entire governmental coup and throwing this country into chaos and anarchy.

Maybe it’s the fact that I have to defend the decision not to go with McCain (who wants more of the same BS) at my workplace (who are all hardcore christian right-to-lifers) constantly, but I almost feel the need to illustrate: this country, in its current direction, is fucked. Unless something seriously changes soon, we will not be the world’s superpower, we will not be the nation the world looks up to, and we will certainly not be the nation that we all want ourselves to be. George Bush is not our savior; he was a CEO (of a company that was financed with money from Osama bin Laden’s half-brother) before he was a president, and is even less qualified to be president of the United States than Sarah Palin.

Let me clarify: I’m not a liberal by nature, at least in the classical sense. I don’t think the government should be involved in as much of our lives as they are, but the conservative party now is not the traditional conservative. They’re neoconservative, which is a euphemism for “against social programs” and “against equality.” Neoconservative viewpoints hide behind a “God said this, and I know it to be true, therefore it must be true” thought process, which I can’t seem to wrap my head around. Neoconservatism is like traditional liberalism, but without the liberal belief system. They still believe in legislating opinion to protect the citizenry from themselves.

If you believe this country is doing just fine as-is, and that McCain represents a positive future for America, then I am truly saddened. No amount of pleading or convincing on my part will be fruitful. I’d like to tell you about how the GOP lies to its constituency, and how they portray benefits for people making over $250,000 per year as being relevant to normal middle-class citizens, and how their health care plan (which was contrived in the first place by Nixon and Kaiser Permanente) makes you feel like you’re the one at fault is completely screwed up, but honestly…

Nobody listens to somebody who says these things. At the first mention of death tax, health care, or energy concerns, people who listen to the GOP completely shut down and repeat the mantra, “estate tax bad, social welfare bad, offshore drilling good.” I’ve been told that McCain’s policies are good because he’s against taxing working folk, against large corporations, and against “Big Oil”…but what does that mean? Anybody can take a stance against taxing, stealing from, and raping people.

Words don’t mean anything with regard to political rhetoric. Take a look at the record of this country. If you want specific examples, I’ll give them. What I don’t want is another intellectually dishonest conversation about how expressing my issues with this country is unpatriotic, or how Obama is another Hitler, Castro, or other dictator. I don’t want to hear about campaign-trail-soundbites about some exaggeration that Obama made about McCain. I certainly don’t want to hear about how disagreeing with some of these things makes me less of an American.

With that, I’m done discussing politics. I will continue to support Barack Obama until he is elected, but my vote has been cast.

She Wears Things, and Makes Them Too

Issa.  Wearing things.

Issa. Wearing things.

issarocks of wewearthings has set up an Etsy shop.

It’s sure to have a good deal of fashionable stuff in it, but I don’t run a fashion blog, so what do I know?

Serverification and Geeks Bearing Gifts

Originally posted July 5, 2006 on my old blog:

I have finally set up a Xubuntu server for myself to play with. The server will be hosting this site, and any other crap I decide to put on it. I’ve asked myself a couple of times why I didn’t just use the default install of Gnome.

Xfce looks just as good out of the box, in my opinion, and works pretty much the same way. After getting everything configured, though, I jumped straight to Blackbox (having invested large amounts of time getting bbLean configured on my work PC).

Regarding Linux on the Desktop, I’m afraid I’ll have to say the same thing that most people are saying who have evaluated the various flavors of Ubuntu: it’s not ready.

If you ONLY want OpenOffice and a browser/email client, then something like Ubuntu might work for you. If you actually want to install anything, however, be prepared to jump to a terminal window. A lot. Note that I am not saying that any Linux installation is limited to this software. Read carefully.

I installed Edubuntu on a machine I’m giving to my daughter for her 5th birthday. Guess what? It’s Ubuntu with the educational packages installed, and a cartoony icon theme. Ho hum. Some of the software is decent, some less so.

So far, it has managed to not load ALSA, which would make more sense to have installed on this box than on the Xubuntu server (which DID manage to configure the sound, incidentally, on an exactly identical box).

Edubuntu is not really what I expected, but it seems I found what I was looking for in it through GCompris. I’ll have to look at that some more when I have time.

The plan is to get Evelyn’s computer up with some kind of software which can introduce her to a computer, without bogging her down with all the tasking crap. I’m also going to paint the case to something appropriate for a little girl. Probably something Disney-princessish. I look thusly for inspiration. It takes a manly man to buy pink paint and ask which markers make a rainbow. I probably won’t go that route though. I’ll just print something onto the side and cover it with clearcoat or something.

Update October 2008: The only Linux to stay on these machines is the Xubuntu installation, which has been stripped of window manager and any GUI-related software, and runs as a pure server.

I had since tried to run Ubuntu Hardy as my primary desktop, which was a supremely awesome failure. After two straight weeks of zero work getting done, I am now happily productive on Windows XP again.

Evelyn’s machine runs Windows XP, and has been running fine since this was posted. I actually found more educational software that worked on Windows, wouldn’t you know?