Speeding Up Internet Access with Firefox

I stumbled across a post earlier today, and I thought it was far too rich and useful not to share. This post isn’t for the faint hearted, as a wrong click on a configuration key not mentioned here could impair Firefox’s performance, or worse, stop it working completely.

By following these instructions, you agree I have no liability whatsoever if something goes pear-shaped because you clicked on something you shouldn’t have!

With that said..

  • In Firefox; navigate to “about:config”. Click the “I’ll be careful” button (last warning!). You’ll be greeted with a load of configuration options.
  • Set the following values for the keys specified (use the search box at the top of the page to find the key. Searching for “network.http.max” will return the top 3 keys).
    • network.http.max-connections-per-server: 25
    • network.http.max-persistent-connections-per-proxy: 25
    • network.http.max-persistent-connections-per-server: 25
    • network.http.pipelining: true (just double click where it says “false” to change it to true)
    • network.http.pipelining.maxrequests: 8
    • network.http.pipelining.ssl: true
    • network.http.proxy.pipelining: true

Setting these values alone, I saw a huge increase in how fast pages loaded. If you have any other tips for speeding up your Firefox, please comment! I’d love to know other people’s experiences using these, and any other methods (whether good or bad).

Amazon Web Services – A Guide to Implementation

I realise that I’ve been neglecting my blog for a while now, with my last post published at the end of March. Quite frankly, I’ve not had anything interesting to write about. However, career starting pastures new, I’m starting to have interesting things to write about again. Over the course of time, I’ll probably post a lot of stuff about Amazon Web Services (AWS), Zend Framework, amongst other things. Today’s babble though is about implementing AWS as your core hosting infrastructure, and the benefits and downsides to it. I’ll also post my findings about the best way (in my opinion) to implement certain requirements.

Continue reading “Amazon Web Services – A Guide to Implementation” »

Outlook 2010 not storing passwords

I recently came across a problem with Microsoft Office Outlook 2010 on Windows 7 whereby it didn’t seem to be saving passwords when connecting to Microsoft Exchange (2007, at least). Now, I’ve used Outlook 2010 on Windows 7 before, and it saved the passwords a treat. Some people seemed to suggest it was architecture related (x86 Office on x64 Windows), but others seems to have the problem on x64 Office on x64 Windows 7 (which is where I came about the issue).

Continue reading “Outlook 2010 not storing passwords” »

(Not very) Surprising revelation about Magento

So eBay has come out of it’s shell and exclaimed that it owns 49% of Varien, having invested $22.5m in the Magento project.

That explains why the Paypal module is so tightly integrated within Magento, and is so much more powerful than anyone else could possibly think of making another payment module. Even Google Checkout’s implementation is nowhere near as powerful. And since Google owns the world (or most of it)..

Update: As of June 6th 2011, eBay now owns 100% of Magento Inc.. They’re talking about integrating it with eBay’s own X.Commerce initiative, which will be revealed to developers in October 2011. What that means for Magento, I’m not too sure. Usually, large take-overs like this involve some kind of product overhaul, or ditching in favour of the taking-over company’s own products. I don’t think this is the end of the line for Magento, but I think in the next 12-18 months, we’ll see a massive change in Magento as a whole product.

Getting value of Attribute Option and adding a new Attribute Option in Magento

This, I find, is a hard one to come across. At least, trying to find a sensible solution that just spits out a numerical value which, more often than not, is all you want. Needing to get the value of an option from a multi-option/dropdown attribute. Try this:

public function getAttributeOptionValue($arg_attribute, $arg_value) {
    $attribute_model        = Mage::getModel('eav/entity_attribute');
    $attribute_options_model= Mage::getModel('eav/entity_attribute_source_table') ;

    $attribute_code         = $attribute_model->getIdByCode('catalog_product', $arg_attribute);
    $attribute              = $attribute_model->load($attribute_code);

    $attribute_table        = $attribute_options_model->setAttribute($attribute);
    $options                = $attribute_options_model->getAllOptions(false);

    foreach($options as $option) {
        if ($option['label'] == $arg_value) {
            return $option['value'];
        }
    }

    return false;
}

And use it as such:

$optionValue = $this->getAttributeOptionValue("size", "XL");

where “size” is the attribute name/ID in the database, and “XL” is the exact label belonging to the option you need to get. Likewise, if you need to add a new option to the attribute’s list, use this:

public function addAttributeOption($arg_attribute, $arg_value) {
    $attribute_model        = Mage::getModel('eav/entity_attribute');
    $attribute_options_model= Mage::getModel('eav/entity_attribute_source_table') ;

    $attribute_code         = $attribute_model->getIdByCode('catalog_product', $arg_attribute);
    $attribute              = $attribute_model->load($attribute_code);

    $attribute_table        = $attribute_options_model->setAttribute($attribute);
    $options                = $attribute_options_model->getAllOptions(false);

    $value['option'] = array($arg_value,$arg_value);
    $result = array('value' => $value);
    $attribute->setData('option',$result);
    $attribute->save();

    return $this->getAttributeOptionValue($arg_attribute, $arg_value);
}

and use as such:

$optionValue = $this->addAttributeOption("size", "XXL");

again, where “size” is the attribute name/ID, and “XXL” is the label of the new option required. It returns the value of the option it just added incase it’s needed. Bear in mind that this function doesn’t first check to see if the label already exists as an option, so you should probably use $this->getAttributeOption() first and only run $this->addAttributeOption() upon a false return.

It’s probably not the most efficient way of doing it, but if efficiency is what you really need, $options could be cached/saved so that the DB/model is only every queried once across both functions within the same model.

n/a