Github Gists broken again

So I see that the Github Gists are broken again, when they load via AJAX. Soo, let’s go and fix it. https://bl.ocks.org/staeff/2b3ade0edcd3100f79c9 https://www.bennadel.com/blog/2312-loading-github-gists-after-the-page-content-has-loaded.htm

Ubuntu script for quick Gcloud Compute CLI access

This lil’ function shortens the Gcloud Compute Engine SSH command to gc [instancename] and if no instance name is given, lists all instances.

FFS, running a Magento (1.x) subdirectory storeview on NGINX

I’m writing this for all good and holy, as other Mage developers will recognize. Setting up NGINX configuration for a multistore installation can be a massive pain in the unpleasants. After another night of sighing, moaning and clicking through pages and pages of Google search results, I found something that works. Now obviously this is […]

Failing nginx tests

So this is another weird one for me. While developing a Magento store on a self-setup LEMP stack I found out eventually that some parts of the system weren’t working correctly, and that no logs were being written. My first guess was that there was something wrong with the filepermissions, I think this has to […]

Magento 1.9: Add custom attribute to category

Step 1. Init module app/etc/modules/AT_CustomCatAttr.xml Step 2. Create config app/code/local/AT/CustomCatAttr/etc/config.xml Step 3. Create SQL script app/code/local/AT/CustomCatAttr/sql/add_category_attribute/mysql4-install-0.0.1.php Make sure the filename and path match the version (0.0.1) and nodenames (add_category_attribute) of the config.xml from Step 2. Optional If you change anything in the module, you can update it with a new version number. In this case […]

Install modman for Magento

Install Modman from GIT bash <

Compute Engine LEMP Stack PHP7 for Magento 1.9

So I was tasked to set up a LEMP Stack with PHP7 on a Google Compute Engine and to install a new Magento 1.9 install on it, for further development of things. This is my story (that is to say this isn’t as much a tutorial as it is just a notebook of the things […]

jQuery slideOpen from fixed to auto

I came across this little problem trying to do something that seems obvious; animate a div sliding open from a fixed height in pixels to a full auto height. Apparently this is something jQuery can’t do out of the box, at least not without some help. It uses a DOM node known as scrollHeight. In […]

QND: Style active page

Sometimes you just need something quick’n’dirty, like this time I had to add an active class to totally unrelated items on a page, based on the page title.

WordPress check if child/parent

I recently came across a situation where I needed to show a sidebar on a page template, if the page has childeren. Consequently I also had to check if the current page was such a child, and if so show the same listing from the parent (which are ‘sibling’ pages at this point). To do […]