the personal weblog of raffy banks

Burst Pipe at Whole Foods

In the middle of shopping at Whole Foods the fire alarm went off, freaking everyone out. It quickly was shut off and an announcement came on stating that it was just a test and that they apologized for the annoyance. Hmmm…. Ok.

So we went up to the garage to our car and this is what we found.

whole-foods-burst-pipe

PayPal a bit Wonky in Google Chrome for Mac

chrome-and-paypal

There is also an issue with printing packing slips from PayPal’s Multi-order Shipping tool. Only the first 3 slips print out.

Other than those two issues, oh, and the lack of Sliverlight (which means no Netflix viewing), I have been loving Google Chrome and am using nearly exclusively.

Oh heavy heart
Weighed down by so many leaves

Artichoke… One of my favorite poems, but I have absolutely no idea who the author is.

“A man in Afghanistan once told me that a third of this planet eats with spoons and forks, and a third of the planet eats with chopsticks, and a third eats with their fingers. And they’re all just as civilized as one another.” - Rick Steves, The other side of Rick Steves

Múm’s Mr. Silla Covering Killing Moon by Echo & The Bunnymen

Adding a Confirmation Message to GitX’s ‘Gist it’ Button

gitx-gist-itUse GitX?

Ever been tempted to click the Gist it button? Or maybe you accidentally did click it, only to find out…

GitX will try to upload your current commit as a git patch to gist.github.com - GitX User Manual

The attempt will be made without any confirmation on your part.

So, what if you don’t want to upload your commit?

Well, you could just make sure never to click the ‘Gist it’ button.

Or you could disable the button from within the preferences, and flip it back on when you do want to Gist something.

disable-gist-it

That’s OK, but what I really want is a message confirming the action, so if I do ever accidentally press the ‘Gist it’ button, I can just cancel the request. And since the code that GitX uses to run these commands is in HTML and Javascript, It is very easy to slip in some code of our own.

Here’s how to add a confirmation message for when the ‘Gist it’ button is clicked

fyi. This is a really quick and semi-dirty hack that will be lost if you re-install or download a new version of GitX.

  1. Open Finder > Application, ctrl (right) click the GitX application and select ‘Show Package Contents’.
  2. Navigate to ‘Contents/Resources/html/views/history/’ and open ‘index.html’ in TextMate or other plain text editor.
  3. Add the following within the head tags:
    1. <script type="text/javascript" charset="utf-8">
    2.     var confirm_gist = function(confirmation_message) {
    3.         // Set optional confirmation_message
    4.         confirmation_message = confirmation_message || "Yes. Paste this commit.";
    5.         // Show div#notification, since it’s set to display:none; by default
    6.         $("notification").style.display = "";
    7.         // Hide img#spinner, since it’s visible by default
    8.         $("spinner").style.display = "none";
    9.         // Insert the verification links into div#notification_message
    10.         $("notification_message").innerHTML = ‘This will upload your commit to http://gist.github.com/<br/>Are you sure you want to continue?<br/><br/>’ +
    11.         ‘<a href="#" onClick="hideNotification();return false;">No. Cancel.</a> | ‘ +
    12.         ‘<a href="#" onClick="gistie();return false;">’ + confirmation_message + ‘</a>’;
    13.     }
    14. </script>
  4. Update the ‘Gist it’ button to look like:
    1. <a class="servicebutton" id="gist" onClick="confirm_gist();return false" href=‘#’>
    2.     Gist it
    3. </a>
  5. Save the changes made then quit (if open) and re-launch GitX.

Now, whenever you click the ‘Gist it’ button, a notification message will appear within the notification_message div (The same place as ‘Gist it’ status notifications):

gist-it-confirmation

confirm_gist() also takes an optional string which can be used to alter the confirmation link, like so:

  1. <a class="servicebutton" id="gist" onClick="confirm_gist(’Upload this commit.’);return false" href=‘#’>
  2.     Gist it
  3. </a>

Caveat

Re-installing or upgrading GitX will wipe this ‘hack’ which is why I didn’t alter the gistie() method in the history.js file. Altering as little as possible, and only the index.html file makes it a bit easier to ‘track’ and save if a feature like this is not implemented in future releases.

Lighthouse user James T uploaded a patch, https://gist.github.com/fc3c9773f6a2bcbeb7a9, that may be worth a look. It is very similar to what I have done, but involves rewriting-or-renaming the gistie() method and creating two new javascript methods. He also added some nice CSS stylings to the buttons.

You can alter or add to the stylings by adding to the stylesheets found in Contents/Resources/html/css/

Also see GitX’s Lighthouse ticket on this very matter: #58 Suggestion: Usability of “Gist It” button. As of this post (16 March 2009), and GitX ver. 0.6.1, this ticket is still open and clicking ‘Gist it’ will upload your commits to gist.github.com without confirmation.

Sunday’s Links

Don’t Launch
Happy Notes
Overnight Success: It Takes Years
5 Awesome Sci-Fi Inventions (That Would Actually Suck)
Apple logo converted to second monitor
Listable
Double your userbase with two lines of code and a box of Modafinil
Nerd Merit Badges
War? (Boagworld interview with Daniel Burka and Joe Stump from Digg)
Amanda Offenbacher Photography
Stack Overflow Podcast #27 (Interview Alexis “kn0thing” Ohanian and Steve “spez” Huffman of Reddit)
Orange Alert
Priceless

To Rewrite?

I’m getting very tempted to rewrite an application that I’ve been working on for about three months now. All sorts of reasoning to do so have tugging at me, but what actually prompted this temptation is a side project I’m working on with @iheartcinnamon (kat). It made me realize how hard it actually would be to move the application forward.

The core of the application, while works flawlessly, is implemented rather poorly. The code is horribly organized, methods were created on a case-by-case basis which has lead to duplication throughout, business logic is confusing at best, the XHTML templating system is a complete mess, and, well, I could go on for awhile.

My side project has reaped the benefits of this, it’s core is implemented with clarity, ready to be extended anywhere. Since the two projects have similar core needs, writing it came as second nature; I already knew what it needed to be and how I to get it there. But does this warrant a complete code rewrite?

Three months is not a long time, per say, but extending the development time would cut deeply into its launch date. What to do? How do I satisfy my itch of rewriting it, bring clarity to the code so it can be extended with ease and make sure I launch fast and often?

Before I do anything, I’m off to do some research into the implications of rewrites and I will return to this topic in another post.

Branded Credit Cards, Milking You For All It’s Worth.

My previous post, The Dreaded Last Minute Sales Pitch, leads nicely into this one…

My credit card is pretty boring. All it has on it is my bank’s logo and the visa moniker. I do “get” credit cards with your favorite sports team on it or better yet charitable credit cards for cancer research or wildlife refuge. What I do not get and near despise are business branded credit cards.

What possible benefit could you get from something like a MySpace branded credit card?

MySpace and others who offer branded credit cards are milking their customers for all it’s worth, practically admitting that they will not be around for very long or in it for the long haul. Whenever I am offered a branded card I immediately assume that they just don’t care. They will sacrifice a few customers here and there in order to make a quick buck.

When this becomes a means of income for a business I find they will sacrifice anything to get more and more people to sign up.

The Dreaded Last Minute Sales Pitch

I had a terrible experience at Banana Republic last week. I went in to buy a new pair of pants, real quick, I know my size, I know the “cut”, etc.

Head down, careful not to make eye contact with any employee, I headed to the rack. Of course, I wasn’t able to find my size, and the color and style was perfect for the jacket I had. I had to ask for help.

What a mistake. I found an associate to give me a hand who began helpful enough, calling someone to look in the “back” for my size, but the experience quickly went downhill. After the usual up-sale pitch, “what no shoes to go with your new pants”, she continued, asking how I was going to pay. I knew where the conversation was headed when she continued to “let me know” that they have a Banana Republic credit card that will save me a certain percentage on my first purchase, it’s good at certain stores, blah, blah, blah. She just would not let up, as if I was a fool for not applying. “You just apply, get the discount and then cancel the card!”

Huh? Yeah, right.

These last minute sales pitches seem to be happening more and more as retail execs are looking to squeeze out every little penny than can from their customers. The real downside is that it forever harms your product, the experience, and makes wanting to spend money even harder. Why would I want to go back and deal with that?

When times are tough looking at your employees to save you, getting them to sell more and sell better, is harmful. Hounding your customers is not going to save you. Why not make your product better. If sales suck, why not place focus where it should be.

The dreaded last minute sales pitch, you always know when it’s coming.

RJB is proudly powered by WordPress | Subscribe: Entries (RSS) | Email: raffybanks at gmail