Adding custom variables to Magento Static Blocks

I’ve recently been asked to customise the front page of a magento store. The client wanted the ability to specify a different set of top links depending on whether the customer was logged in or not, and they wanted to be able to changes these links from the admin section. They also wanted the logged in links to display the customers name. The problem with this is that the standard magento CMS static blocks don’t provide access to the customer by default, so I thought I was going to have to build an extension to pass the variables in. Read On →

MySQL Performance Tuning

Just came across this forum post of MySQL that looks to be a gold mine of information related to performance tuning MySQL. For reference I am copying and pasting the full thing here though all credit goes to the above. Book: High Performance MySQL (2nd Edition) http://www.highperfmysql.com/ MySQL Performance Tuning - Best Practices: http://jpipes.com/presentations/perf_tuning_best_practices.pdf MySQL Index Tuning and Coding Techniques for Optimal Performance: http://jpipes.com/presentations/index_coding_optimization.pdf Web Performance and Scalability with MySQL: Read On →

Writing Robust Bash Shell Scripts

Found this great article on writing bash scripts defensively. Glad to say most of the advice we are already following with our bash scripts however there are a couple of new things I intend to roll in on Monday. Recommended reading for anyone scripting in Bash. http://www.davidpashley.com/articles/writing-robust-shell-scripts.html

Sun Java 1.6.0.30 packages for Ubuntu « « Flexion.Org Blog Flexion.Org Blog

If you want or need sun java for your Linux Ubuntu desktop, perhaps for running Netbeans, then you will like this link http://blog.flexion.org/2012/01/10/updated-sun-java6-packages-for-ubuntu/ There is a PPA for sun java. Problem solved.

Compare two columns in mysql

Many database queries rely on seeing if two columns match / differ, however sometimes you may want to check if either column contains a sub-string of the other. MySql allows you to do this, but it isn’t that well documented, so hopefully this will help someone looking for this in the future SELECT * FROM table WHERE col1 LIKE CONCAT(‘%’, col2, ‘%’) OR col2 LIKE CONCAT(‘%’,col1,‘%’)

Got the Insecure Content on a Secure HTTPs Page Problem - Easy Solution

Often you will see SSL warnings or errors related to insecure content being displayed on a secure page. This could be as simple as one javascript file or image that is being included via http rather than https, though some times this can be a bit tricky to track down. The easiest solution is to hit this site: http://www.whynopadlock.com/ This will give you a clear report of the problems and should help you quickly find and fix them. Read On →