I recently wanted to download around 20,000 emails from a specific label in my gmail account.

To do this, I used GMVault.

I’m not going to talk through the basics of setup / using this as it’s already talked about at length on the GMVault site.

However, in order to get it to download only the mails in a specific label, you will need to do a custom sync.

The command I used was this:

gmvault sync –type custom –gmail-req “in:LabelNameGoesHere” email@domain.com

This worked fine, however all files were compressed.

To solve that, we can simply add –no-compression like so:

gmvault sync –type custom –gmail-req “in:LabelNameGoesHere” email@domain.com –no-compression

Now, all emails are downloaded as .eml files from the LabelNameGoesHere label

I recently noticed that while replying to an email in google apps (or gmail for that matter) it wasn’t defaulting to Reply All – despite me enabling this lab.

Upon further inspection, I noticed this was no longer an option in the Labs.
Fearing that it had been removed altogether, I had a look over the General settings tab, and found that it had graduated from a ‘Lab’ to an actual feature:

Reply all graduated from a lab to a feature in general settings

This was also confirmed by this post

So, why wasn’t it selecting ‘Reply All’

The answer lies in the fact that I rely heavily on keyboard shortcuts

I saw that Reply had the shortcut ‘r’

but Reply all was ‘a’

reply keyboard shortcuts

Now, I only ever use ‘r’ to reply, and in 90% of cases, I actually want to reply all, so I set my Reply all option to be a or r

Now, if I hit ‘r’ by default, the reply is to all participants

Recently, I was working on a project with a similar business model to hotel booking websites such as LateRooms.com and Booking.com:
The customer reserves a “room” from a third party. The customer pays at the hotel. Failure to show, results in customers card being charged.

I was intrigued about how the others got this process to work, and naturally went about finding out, and doing some research.

Despite me thinking there was some kind of repeated pre-auth happening on the customers credit card until day of booking, I was concerned, and almost horrified when I discovered how these sites handle the process.

This is what actually happens on the above mentioned sites (and others not listed)

  • Customer makes booking on secure site. Reassured the way through that the site is using SSL encryption etc…
  • Customer submits their credit card details, as security for the booking.
  • Here’s the scary part:
    The booking website then faxes the hotel details of your booking, along with your credit card number, address, CV2, and expiry date (all the details required to complete a card not present transaction)

How did I discover this?

By signing up as a hotel, and reading how their process worked!

Naturally, I was worried, so i emailed one of the sites, asking them to confirm how the process works as a customer.

Here’s part of their response:

When your booking is processed via *********.com, the information you supply is securely sent to your chosen hotel via fax. Several other companies use this same method of transfer however, we are looking at implementing a full digital system to transfer card information.

Not all hotels will receive the CVV/CV2 number from us unless they have confirmed that the property is fully PCI/DSS compliant. Any hotel that is not compliant with this does not receive the full card information. The CVV/CV2 number is sent on the first fax only (to compliant properties) and then is omitted from any further faxes and is not held on our systems.

Naturally, this got me thinking: What if fax machine was accessible by other staff? Nosey customers? Joe public?
I’ve stayed in several hotels (some scarily booked on websites such as this) who’s “back room” office I wouldn’t exactly class as secure.

The advantage of working like this for the booking site however is clear:
They don’t actually handle any money. Therefore, reducing their liability for chargebacks etc… They simply invoice the hotel for their commission.

I’ve used eLance for various outsourcing projects for a number of years.
(Great for small tasks, and an extra pair of hands until the 25th hour in a day is discovered!)

Sure, I’ve had my fair share of problems, however, all have been amicably resolved, talking with eLance and the contractor.

WebHouse
(Md. Zakir Hossain Dakua)

Recently, I had a small requirement for a WordPress theme to be slightly customised.
Unfortunately, I was heading off on holiday, so needed to outsource it, to meet my clients timescale.

I posted the job up on eLance, and had the usual 30 or so bids.

One of those, was from WebHouse (Zak D.), from Shabujbag, Dhaka, Bangladesh.
Real name – Md. Zakir Hossain Dakua.
Just in case you’ve had contact from him directly, his email address is:
zakirdaq@gmail.com

I’m usually pretty good at spotting the “bulls*t” in the initial communication (typically, they’ll just say “yes” to everything")

The fixed price work was completed, and he immediately began pressuring me to release the escrow.
He also changed the job to “complete” which meant escrow would auto-release.

Due to my holiday, I didn’t have chance to review the code, was just able to check the basic functionality.

Later, when more data had been added, it was apparent there was a problem with his code.
I asked to get him to fix his own bugs, and here is where the problems started.

A contractor can create a job on your behalf!

On eLance a contractor can create a paid hourly job on your behalf, without you authorising it!
This is what happened. I asked him repeatedly to tell me how long in hours, it would take (and therefore how much) Obviously I got no reply.

WebHouse offered no reply, until he submitted a time-sheet for over 7 hours (at $20/hour) to fix these bugs.

I rejected this, however, but, was on vacation when the “review period” deadline was.

I had emailed eLance to state that I do not authorise them to charge my card.
Heck, I even cancelled my credit card before I went!

However, eLance ignored all of this, and charged my card anyway (damn pre-authorisation must of kicked in!)

Since then, I’ve had nothing but bad news from eLance support who refuse to help.

But why should they? They get their 10% commission from the $150 odd I have been scammed by.
They claim that their “WorkView” process is bullet proof, and that I could review the screenshots… etc…
This is all true, but the work he was doing, was to fix bugs he had created, on work that had already been paid for!

WebHouse has been very unhelpful, right from the start of my dispute.
Stating that the work was done, it was quality work etc…
He even started getting rude, calling me “mad” for doubting the quality of his work (all in hard to decipher, broken English)

I’m using this blog post to drive home how poor his work really was!

I just hope a prospective client stumbles across this post, and choses to decline his bid, before being let down in a similar way to me!

Resolution

Elance finally agreed (after many emails) that there was a problem with the way WebHouse worked.
Although, unfortunately, they wouldn’t take the money back off him, they did credit me with $75.

So, moral of the story, I guess:
Don’t use eLance WorkView, or eLance at all for that matter!
I’ve since moved to oDesk. Far more reliable.

Create a Google Chrome Extension

I’ve been meaning to look into creating a Google Chrome extension for a while.

Earlier this week, I successfully RickRoll’d Rob Ashton on twitter, which in turn, after a RT, RickRoll’d several others. Many of whom replied with tweets like

@alexjamesbrown @RobAshton You bastards! ;-)

@alexjamesbrown @RobAshton Damn it! grrr.

So, that got me thinking.

What if there was a way to stop you being RickRoll’d. Then I remembered I wanted to learn how to create a Google Chrome Extension… The two ideas fused, and RickMeNot was born.

Step 1 – Create a Manifest File

I created a RickMeNot directory (and init a git repo, of course…)

Then, create a new file using <insert your favourite text editor here>

All  extensions, installable web apps and themes have a manifest file.
This is a JSON file, needs to be called, quite descriptively, manifest.json.

Read more on Manifest Files

The manifest.json for RickMeNot looks like this

{
  "name": "RickMeNot",
  "version": "0.1",
  "description": "Prevents you from being rickroll'd.",
"background_page": "background.html", "permissions" : [ "tabs" ], "icons" : { "48" : "icon-48.png", "128" : "icon-128.png" } }

Most of this is fairly self explanatory.

What we’re basically doing, is setting the name, version and description of the extension.

We then specify the background_page.

A background page, is basically a long running script that manages a task in the background, while the extension is active.

This particular extension won’t need a fancy button (Browser Action) or anything like that, so we only need to specify our background page.

Permissions

One thing to take not of is the permissions array.

This particular extension needs to be able to access the urls of tabs etc… so, we’ll need permission to use “tabs”.

Background Page

Ok. So we have our manifest file that tells the extension what to do, so now we need to create a file that tells it how. This will be where the main functionality of this extension is.

Although this is a .html it doesn’t have to contain the usual doctype and other tags.

It simply needs a <script> and </script> tag, with all the script for the code in between.

Let’s start real simple:

<script> chrome.tabs.onUpdated.addListener(tab_updated); </script>

What this does, is add an event handler for the tabs.onUpdated event.

As expected, this fires when a tab (any tab) is updated.

Note: I’ve called our callback tab_updated – this can of course be called anything.

Our tab_updated function looks like this:

function tab_updated(tabId, changeInfo, tab) {
    for (a in rickUrls) {
        if (tab.url == rickUrls[a]) {
            chrome.tabs.update(tab.id, { url: 'savedFromARickRoll.html' });
        }
    }
};

Ok- so what this does, is loop through all the values in our (as yet undefined) rickUrls and checks if the tab.url (the value from the passed in tab object) is equal to one of the values in our array.

If it does, it updates the tabs url (think of this as a redirect) to “savedFromARickRoll.html” (more on this later)

Populating our array using body onload

So, now we need to populate our rickUrls array.

While our background page doesn’t have to have HTML tags, it can. It can also contain some client side executed javascript.

In this instance, we’re most interested in executing the body onload event

In our background.html we simply add:

<body onload="init()">
</body>

Our “init” function is in between the <script> </script> tags and looks like:

function init() {

    rickUrls = new Array(
      "http://www.youtube.com/watch?v=oHg5SJYRHA0",
      "http://www.youtube.com/watch?v=EK2tWVj6lXw",
      "http://www.youtube.com/watch?v=XZ5TajZYW6Y"
      )
}

In version 0.1, we’re just hardcoding a few of the known youTube URL’s

In later versions, I’ll rewrite this to check an external file / service or something to get an up-to-date list of them.

Putting It All Together

This is what our background.html looks like:

<script>

    // Simple array containing the URLs of Rick Astley - Never Gonna Give You Up videos.
    // In this version, we're hard coding it, however later on, we'll make this dynamic
    var rickUrls = new Array();

    // Function that is called on the body onload event
    function init() {

        //fill our array with the URLs
        rickUrls = new Array(
		"http://www.youtube.com/watch?v=oHg5SJYRHA0",
		"http://www.youtube.com/watch?v=EK2tWVj6lXw",
		"http://www.youtube.com/watch?v=XZ5TajZYW6Y"
		)
    }

    // This function is called by the listener we added, when the url of a tab changes.
    function tab_updated(tabId, changeInfo, tab) {
        for (a in rickUrls) {
            if (tab.url == rickUrls[a]) {
                chrome.tabs.update(tab.id, { url: 'savedFromARickRoll.html' });
            }
        }
    };

    // Listen for any changes to the URL of any tab.
    chrome.tabs.onUpdated.addListener(tab_updated);

</script>

<body onload="init()">
</body>

Files within an Extension

An extension can contain files, like our savedFromARickRoll.html, and you can reference them locally.

This also applies to images (see the image in our savedFromARickRoll.htmlnoRickRoll.jpg)

You can’t however, refer to anything else on disk (c:\ or anything like that)

This is obviously for security reasons.

Source

I’ve put all the source for this post on GitHub

You can download it here: https://github.com/alexjamesbrown/RickMeNot

What’s next…

I’ve got a couple of follow up posts planned on this.

Firslty, a short one on how to list your extension in the Google Apps Marketplace (will add link as soon as it’s ready)

Also, when I get time, I’ll write a post along the lines of calling external services to get a list of updated Rick URLs

Page 1 of 3