Metis – A Divine Solution for Aliases

Preamble

Do you not hate that moment when you think to yourself, “I should add an alias to my .bashrc file, so I will not have to cd to this long-ass path a few hundred more times over the next two weeks,” but then you just keep coding. However, that’s hardly the only issue with aliases. After a few years, you’ll start to accumulate 10′s and 20′s of aliases across multiple machines. Your only option is to peek into your dotfile to see what goodies you might have stashed away weeks, maybe months ago.

Metis – Goddess of Wisdom

I wrote Metis to solve this problem. Metis saves aliases that will cd to the current working directory. If you’ve forgotten your saved aliases, type ‘metis’ and press return. Aliases for everyone.

Coley’s Hacker News Extension

Overview
Coley’s Hacker News is a Google Chrome extension that tweaks the Hacker News experience. Although there are only two tweaks(for now), the efficiency increase is two-fold: Hacker News refreshes every minute; Outgoing links now open in background tabs.

No more manually refreshing after switching back to your Hacker News tab. No more holding down Ctrl/Cmd while clicking an outgoing link to open an article in a new tab.

Download
Download from the Chrome Web Store.

Future
In the near future, we’ll be adding more tweaks and perhaps a settings component for toggling individual tweaks off and on.

Got an idea? Contribute! You can fork Coley’s Hacker News on GitHub.

Naughty, Naughty Dog

Turns out my power of observation have failed me and my faith has been restored. Uncharted 3 does come with an online pass. A fellow tweeter let me know that the online pass code was on the back of the game manual. This wasn’t apparent enough for me, so now I’ve gone and made a fool of myself.

So who wants to play some Uncharted 3 online? =]

UPDATED literally seconds after being published.

This article is directed towards Naughty Dog, the PlayStation game development studio.

When your new PS3 game, Uncharted 3: Drake’s Deception, released I was one of the first at Gamestop that morning to pick it up. I handed the cashier nearly $65.00, including tax, in exchange for my copy of Drake’s Deception. I diligently spent the next few days playing the Uncharted 3 campaign. The first time I play a game, I like to play it all the way through, no frills. No co-op, no multiplayer, no nothing… until I beat the campaign. That’s just always how I’ve been.

Well I finished Uncharted 3 a few days ago, and it was pretty good. Too bad I’ll probably never put it in my PS3 again. I know that it seems odd that I would say that right after stating that is was a pretty good game. Normally I never would, but today changed things.

Today I was ready to play Uncharted 3′s multiplayer mode. Unfortunately for you and me both, Naughty Dog, you want me to pay $9.99 extra to play your game online. This is a mistake. Do you realize which industry you’re in, Naughty Dog? Do you realize that you released in parallel with Modern Warfare 3, a game that not only gives you hours of breathtaking campaign, but also gives you one of the best multiplayer experiences out there, all for $65 bucks? The thing is that I don’t even like the Modern Warfare games, but I can’t help thinking that all of my friends that bought MW3 instead of Uncharted 3 got a lot better deal.

I played Uncharted 2 online without having to pay extra, so why should I have to with this title? Is multiplayer any better in this one? It doesn’t matter. The sad fact is that my copy of Uncharted 3 has little to no replay value now. I could have read on the package that you have to activate multiplayer, or trolled forums to look up multiplayer information on the title, but I didn’t. You want to know why? Because I trusted Naughty Dog. It was a trust you could only find in a developer that nurtures your need for their quality games. A trust that I had only shared before with Kojima’s Metal Gear Solid and Silent Hill series, and Capcom’s Resident Evil series.

It wasn’t until after I was disappointed that I was aware that I had this trust for Uncharted. I trusted that you would deliver the absolute best you could for my $65. Why do you need an extra $9, when you’ve delivered great stuff before with just $65 of my money? I know that you’re a company that heavily relies on the revenue that these games generate and probably don’t care if I play your game anymore. You just care that I paid the initial $65 in the first place.

Being a developer myself, it is your developers that I feel the most sorry for. They actually care about people liking and playing their game, not just the money dished out to play it. Because of your greed, hundreds of people just like me will attempt to play your game online, but won’t be able to because they either refuse to pay extra, or don’t have the money to do so. So the game will get played once by those not willing to spend. That’s how we’ll remember Uncharted 3.

My deepest apologies go out to the creative and development staff at Naughty Dog.

CSS3 Button

View the demo.

I’ve been messing around with uploading videos to YouTube via their Data API(a really cool project I’ll be writing about later). I wanted to make a button that matched YouTube’s yellow-ish Upload button, but later added a some of my own bits to make the button a bit more unique. It is made using nothing but CSS3:

.btn {
     background: #fffbc6; /* Old browsers */
     background: -moz-linear-gradient(top, #fffbc6 0%, #ffdb18 100%); /* FF3.6+ */
     background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fffbc6), color-stop(100%,#ffdb18)); /* Chrome,Safari4+ */
     background: -webkit-linear-gradient(top, #fffbc6 0%,#ffdb18 100%); /* Chrome10+,Safari5.1+ */
     background: -o-linear-gradient(top, #fffbc6 0%,#ffdb18 100%); /* Opera11.10+ */
     background: -ms-linear-gradient(top, #fffbc6 0%,#ffdb18 100%); /* IE10+ */
     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fffbc6', endColorstr='#ffdb18',GradientType=0 ); /* IE6-9 */
     background: linear-gradient(top, #fffbc6 0%,#ffdb18 100%); /* W3C */
     -webkit-border-radius: 3px;
     -moz-border-radius: 3px;
     border-radius: 3px;
     border: 1px solid #efc300;
     color: #9c4900;
     font-family: Arial;
     font-size: 14px;
     text-shadow: 1px 1px 0px #d3cdb3;
     filter: dropshadow(color=#d3cdb3, offx=1, offy=1);
     padding: 4px 10px;
     -webkit-box-shadow: 0px 1px 3px 0px #000;
     -moz-box-shadow: 0px 1px 3px 0px #000;
     box-shadow: 0px 1px 3px 0px #000;
     cursor: pointer;
     text-decoration: none;
     position: relative;
}

.btn:hover {
     background: #fffbc6; /* Old browsers */
     background: -moz-linear-gradient(top, #fffbc6 0%, #fffbc6 50%, #ffdb18 100%); /* FF3.6+ */
     background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fffbc6), color-stop(50%,#fffbc6), color-stop(100%,#ffdb18)); /* Chrome,Safari4+ */
     background: -webkit-linear-gradient(top, #fffbc6 0%,#fffbc6 50%,#ffdb18 100%); /* Chrome10+,Safari5.1+ */
     background: -o-linear-gradient(top, #fffbc6 0%,#fffbc6 50%,#ffdb18 100%); /* Opera11.10+ */
     background: -ms-linear-gradient(top, #fffbc6 0%,#fffbc6 50%,#ffdb18 100%); /* IE10+ */
     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fffbc6', endColorstr='#ffdb18',GradientType=0 ); /* IE6-9 */
     background: linear-gradient(top, #fffbc6 0%,#fffbc6 50%,#ffdb18 100%); /* W3C */
     -webkit-box-shadow: 0px 0px 3px 0px #000;
     -moz-box-shadow: 0px 0px 3px 0px #000;
     box-shadow: 0px 0px 3px 0px #000;
     top: 2px;
}

I’ve recently worked on another button that scales, and uses an image sprite for its rollover state. All this with just one element and some css. I’ll be publishing a write-up of that on here as well, so keep a lookout.

Snippet: jIE – WordPress and Cross Browser CSS Classes

One of the newest ways to make Internet Explorer’s horrendous rendering engine behave is to add body classes that define which browser is being used. For instance, if a user visits a site from Internet Explorer 8, two classes would be added to the body tag: "ie" and "ie8". Using this technique, a developer can target specific browsers and write their CSS accordingly. I first saw this method being used in Paul Irish’s HTML5 Boilerplate. Paul uses IE conditional comments to determine which class needs to be added to the body, if any at all.

If you use WordPress as much as I do, you’ll notice that you can’t use this method with WordPress’ body_class function. Even though body_class accepts a string parameter that it will embed into the class attribute, we cannot pass any data detailing the browser version to this parameter. The PHP runs on the server before the conditional comments run in the browser, making it impossible to add the respective classes dynamically.

Fortunately there is an easy way to do this with jQuery:

var b = $.browser;
if(b.msie) {
     var v = b.version.split('.')[0];
     $('body').addClass("ie ie" + v);
}

This snippet must be placed within jQuery’s document ready callback to work properly. Keep in mind that this snippet does not require WordPress to work, but it was written with WordPress in mind.