DeeEmm

Pragmatism in code

Michael Percy AKA DeeEmm - Waxing lyrical about life the universe and everything software related since lunchtime 2006.
DeeEmm AKA Michael Percy is an industrial software engineer specialising in language based programming. A long time supporter and contributor to the open source community, he can mostly be found tinkering about creating web sites and writing code for various CMS platforms as well as maintaining several websites of his own.

Fusion 360 and OSX magic mouse

prefpane

If, like me you are a die-hard Apple fan you have no doubt embraced all of Apples products including the sometimes not so magic, Magic Mouse. Whilst it's a great piece of design, the touch sensitive top is not for everyone (my wife hates it). It also has another annoying limitation when used with products like Autodesk's Fusion 360 - it has no middle button.

Not having a middle button makes navigating with Fusion 360 and absolute PITA, panning and orbiting require several clicks to enable, use and then disable the pan and orbit functions which does not make for a particularly smooth workflow, in fact it is downright annoying. Unlike Fusion 360's predecessor, 123Design, there is no orbit on the right click as this action has been replaced by a shortcut menu, there is also no keyboard shortcuts available to enable pan and orbit functions.

All is not lost however as there is a great little system tray app that solves this problem (and probably a few other problems that I have yet to discover). MagicPrefs is an app that extends the magic mouse's functionality by allow you to assign gestures and taps to trigger custom functions, including, yes you guessed it - a middle click. With the middle click option enabled Fusion 360 all of a sudden becomes much more usable, whats more it is absolutely free.

You can download it from the magicprefs website - http://magicprefs.com 

41 Hits
0 Comments

DIY Reflow oven


I need to make up some SMD boards and have been looking for a low cost reflow oven.

Came across this today, made from a halogen lamp. So thought I'd save it here for later reference.

 

 

Continue reading
273 Hits
0 Comments

Order of magnitudes

So many of you will be familiar with the site as a result of the plugins and modules that I used to offer. Whilst I have restored the sites main content, at this point I have not yet restored the web-store. 

Whilst selling plugins and modules may seem a lucrative endeavour, the amount of resources required to develop and maintain the code is not trivial. The support request expectations for $3 plugins is often surprisingly unreasonable. The support ticket system takes a lot to maintain, especially when it is only me providing the support, and there are subscriptions to maintain, often costing orders of magnitudes more than the plugins actually bring in. All of this was okay when I had time to spare, but being relatively time poor (I work a LOT), there simply is not enough time in the day to do everything that I want to do.

So at this point I am not sure if I will reinstate the store. (I even toyed with the idea of not reinstating the site, but I came to the conclusion that I had too much of a soft spot for it and so it needed to live again). I have previously toyed with the idea of simply releasing all of the plugins for free, and this is probably the path that I will tread but for the time being I am happy to simply have the site back up and have somewhere to talk tech related garbage.

If you have interest in a particular module or plugin please let me know in the comments below.

610 Hits
0 Comments

Recovering InnoDB tables from database files.

After a hiatus of several months the site is back up. The site was unfortunately victim to some script kiddies and fell under the scrutiny of my hosting provider. After a failed attempt to rewind to a previous backup, which turned out to be corrupt, I decided that rather than spend a bunch of time that I did not have spare trying to fix it, I would simply turn the server off and get back to it later. Of course I did not consider that 'later' may stretch to be several months but that's just the way it panned out to be.

So I finally got some free time and decided to take a look at getting the server back up and running. The original issue with the original server was that due to a kernal issue with the server itself, the backup service provided by my host generated corrupted backups, so reinstalling from a backup invariably led to a bricked server. I spent some time working with the host to get the server repaired and whilst I did get a server that I could SSL into I unfortunately did not get any further as the SQL service would not run due to toasted database files.

So with renewed enthusiasm to get the site back up the first thing I did was to create a new server instance. Might as well start afresh, especially with the kernel issue - a problem I did not want to walk back into. I then grabbed all of the database files from the original server which were located at /var/lib/mysql/"DB-Name"

MySql is great in that you can simply physically copy the files from one database to another and the database will become available, however there are some caveats to this. 

Continue reading
655 Hits
0 Comments

Hiatus Haiku

A passage of time gone.

DeeEmm has been away from here.

Set to return soon.

 

535 Hits
1 Comment

Ticket system back up and running

Apologies to those of you who have trie to access the ticket system and were unable to lodge new support tickets. Unfortunately there was a bug in the latest version of the Ticket System software that powers the support section of the site which caused an issue on the 'New Ticket' page. This issue has now been remedied. 

479 Hits
0 Comments

New JomSocial and Hikashop Plugins

New JomSocial and Hikashop Plugins

I've been busy tidying up and publishing some of the plugins and extensions that I use across my sites. Most of the plugins are simple extensions for JomSocial that add a bit of extra functionality that is not included within the core but there are also a few for Hikashop and Virtuemart as well.

I still have some other extensions and components planned for release over the coming weeks / months and will release these as they are finalised and tested. Most are simple but there are also one or two fairly complex components that I may also decide to publish.

So far the following plugins are available for purchase within the webstore:

 

Continue reading
1470 Hits
0 Comments

OSX Maverick stikes again? Exchange Sent Mail Dissapearing

OSX Maverick stikes again? Exchange Sent Mail Dissapearing

I've been a proponent of Mac and OSX for some time now having been attracted to its simplicity and the 'it just works' way that it operates but since the Mavericks update some things simply don't work. The biggest issue that I have found is that apples newly written USB drivers will not connect to my Arduino, a major PITA when it comes to uploading a new program. The solution is to disable the OSX drivers and install the OEM version which worked for me and seems to work in 95% of cases. Why Apple have decided to move away from the chipsets manufacturers drivers I will never know although I suspect that it may be due to an incompatibility that causes Kernel Panics as I have personally experienced these since moving to the OEM drivers. This is fairly repeatable - hold down the Arduino reset button whilst uploading the program and your machine will likely go into an involuntary and instant reboot. The solution is of course simply not to hold down the reset button but as this is a common hack to get the program to upload you may have to suffer a few missed uploads instead. Not a massive issue, at least I can now communicate with the arduino again.

The most recent issue to hit me as a potential result of Mavericks is that sent email messages seem to disappear into the ether instead of appearing in the sent box as they should. This issue only recently came to light when I needed to find some previous correspondence. For reliability and ease of management I use a hosted exchange server to handle my work emails and OSX Mail as my mail client. What I found was that the last sent message in my sent folder was dated December 2013, the previous correspondence I was looking for was nowhere to be seen. I also checked the exchange OWA browser client but after looking there I also found that there were no recent sent mail messages stored.

After a short call with the exchange tech who advised me to use a client that they supported - namely outlook 2010 - he advised that the issue appeared to be related to the Mavericks update. For some reason the outgoing server had been changed - there were now two exchange outgoing servers in the server list. I changed the outgoing server to the other exchange server listed and sent a test message. Viola! the message was saved in the sent messages folder.

I'm not sure why or how the second outgoing server was added, It's definitely nothing that I have consciously done as the exchange account has not been altered since it was setup in 2010, additionally no one else uses this machine. I can only assume that as the tech  suggested it is related to the mavericks update as the last email date roughly coincides with the date that I updated. Of course I am happy to concede that it could be due to some other unrelated reason but knowing that I did not create the second outgoing server makes me wonder how it got there.

Continue reading
2612 Hits
0 Comments

Detecting soft 404's in Paul Irish's Infinite Scroll

Detecting soft 404's in Paul Irish's Infinite Scroll

Ive used Paul Irish's excellent infinte scroll on a number of projects before but recently found that I was having issues with ending the scrolling after the last items was retrieved on Hikashop. The issue is due to Joomla's error handling - instead of  returning a 404 'page not found' error response it returns a normal page ok response (200) - it can do this intentionally when it provides a useful user defined 404 error page but can also do this unintentionally as in this case. This behavior is commonly known as a soft 404.

As infinite scroll relies on a 404 error being returned when there are no more pages to stop further processing, the net result is that the scrolling keeps on going. Not a massive issue but one that results in an annoying animated icon appearing when you scroll past the end of the page.

In my opinion this is not necessarily the best way of detecting the 'end of the internets' as it assumes that the 404 error means there are no more pages. I'm sure we all know what assumptions usually lead to. By far the best way to determine if there is no more data is to check the actual data itself.

I initially tried looking at the length of the data returned but found that this was not really suitable as it contained the entire page and was really hard to separate the parts that I required although this is possibly due to my lack of javascript skills more than anything else. After some testing I found that instead of looking at the data length looking at the length of the child elements returned was the way to go. I this way I could detect when no more data was present.

Continue reading
1051 Hits
0 Comments

Software, reputation and Virtuemart

Software, reputation and Virtuemart

It's been a while now since I last posted about my experience with VirtueMart, but a recent update caused me to have several issues with the PayPal payment gateway.

The recent official 2.0.26x releases included an 'improvement' to the PayPal payment gateway, an update that unfortunately was not sufficiently tested and resulted in normally successful PayPal transactions not being completed but being marked as pending instead. The issue relates to a check that was introduced for the merchant email address.

My investigations unearthed the root cause of the problem - a check that compares the merchant email against the paypal receiver email.

$paypal_data['receiver_email']!=$this->merchant_email

The problem arises when your PayPal account has several registered email addresses, the business email response returns the primary email that is registered with PayPal, if like me, you use several email addresses for several sites on the same PayPal account you will find that invariably the business address will differ from the email address stored as the merchant email address in the VirtueMart payment plugin and the transaction will appear to fail.

Continue reading
1294 Hits
0 Comments

Virtuemart PayPal checkout issues

Virtuemart PayPal checkout issues

Over the past couple of days I have had a number of PayPal payment gateway issues. This has resulted in a number of transactions not being completed even though the PayPal transaction was successful.Transactions were stuck in the 'pending' mode and several customers complained that their purchases were not available for download.

You will be pleased to hear that the issue has now been traced to the recent Virtuemart update that was released. A change was added to this release to ensure that only the primary PayPal email was used for checkout. This resulted in a checkout failure if any other email address was used. If like me you have several email addresses associated with your PayPal account you will likely suffer similar issues and will be interested in downloading Virtuemart bugfix version 2.0.26d:

You can download the updated version 2.0.26d from http://dev.virtuemart.net/projects/virtuemart/files

Apologies to those who were unable to download their purchases straight away. If any new customers experience any issues please comment below and let me know and I will jump right onto it.

105041 Hits
0 Comments

Configuring Joomla to use Zoho mail with MSMTP on Ubuntu.

Configuring Joomla to use Zoho mail with MSMTP on Ubuntu.

A while ago I switched to using zohomail for the email handling on a number of sites that I run. Zohomail is a nice alternative to hotmail or gmail and is also free for a limited number of users which makes it perfect when you just need to add a contact method to a website or just need something to process user messages.

I had previously been running zohomail under the SMTP service on my Joomla installs as I do not have sendmail installed. I find that it's simply too much to maintain and that SMTP is much simpler. Unfortunately for some reason whilst updating one of my sites the SMTP function simply stopped working and no amount of googling could give me an answer. So unperturbed I decided to engineer an alternative to the native Joomla SMTP functionality. After a bit of research and stumbling across Emanuel Tessores excellent article I decided to give MSMTP a shot

MSMTP is a very simple and easy to use smtp client with excellent sendmail compatibility. It can be used to in place of sendmail to allow you to send emails via a third party SMTP server such as zoho, gmail or hotmail. Installation and setup is relatively straightforward being installable via apt-get via the following command

sudo apt-get install msmtp

Once installed you need to create two files; a configuration file for the email server details that you wish to connect to and a log file to record each mail transaction. You can do this by using the commands below

Continue reading
3187 Hits
0 Comments

EasySocial, raising the bar for Joomla social extensions

EasySocial, raising the bar for Joomla social extensions

If you are familiar with Stack Ideas products, such as the blogging component that you are reading from right now EasyBlog, you might have noticed that on their site they have been promoting a soon to be released social networking component called EasySocial. I first noticed this a few weeks back and I must admit I got a bit excited. Not one to usually get emotional over such things, the idea of a social networking component written by the excellent Stack Ideas team definitely has appeal.

I have a love / hate relationship with most extension vendors and products but my experience with Stack Ideas has been great, the support is excellent, the products are intuitive and of the best quality, and what's more they just work. No fuss, no hacking, no convoluted setup, they work with the minimum of fuss and continue to do so. So when I received an email that there would be a webcast on the upcoming EasySocial, I signed up right away. 

Watching the webcast last night I was blown away by the quality of component. There has been a years worth of development so far and there are still features that are being held back for the next release (Boonex please take note). The component includes many ideas and suggestions from the Stack Ideas user base and whilst it was said that the component was not designed to specifically compete against JomSocial, it certainly raises the bar. 

In many respects it is similar in functionality to JomSocial, it follows the standard format for social networking components - that of a facebookesque type of site with an activity wall, profile pages, messaging capabilities, etc. Where it differs is how these components have been executed, it's the fine details that really set it apart. There is a liberal use of AJAX for all functions resulting in what appears to be a very nice user experience, the interface also appears to be very intuitive, although this is obviously hard to really get a feel for from just watching on a webcast.

Continue reading
24889 Hits
0 Comments

JomSocial CSS Maxification - less is actually more

JomSocial CSS Maxification - less is actually more

Just been putting a site together on the new JomSocial version 3. One of the first things I always do (as you should) is create a new template - a clone of the original one. This way I can hack away at creating the site and develop the template as I go along without changing the default.

Changing the style of elements by CSS is a pretty normal act and one that I prefer to do with the original CSS and not by overrides as is always suggested by vendors. Normally I use Coda to de-minify any minified CSS and then re-minify it once I have finished. For some reason I was hitting a few issues when de-minifying the standard templates style.css file, it seemed to be replacing any reference to images with an ASCII reference instead of the path and filename data. Guessing that this must be due to the method used to compress the file (something other than the normal whitespace stripper) I went on a hunt to find out what was up with the new CSS file format.

Not finding too much I stumbled across This Post which simply suggests that the CSS files should not be modified but does not say how they were compressed and how to de-minify them. It does however give a clue - 'use less compiler'.

So I goggled 'useless compiler' and came across the http://lesscss.org/ website. I say 'useless' with my tongue in my cheek, for on the first page there is a bit of a breakdown showing some examples, one is the use of variables.

Continue reading
11148 Hits
0 Comments

You cannot access the private section of this site.

You cannot access the private section of this site.

This was the error I was recently faced with when I re-enabled user registrations here on the DeeEmm site.

You may recall from my last blog post Virtuemart Revisited that I have recently re-installed Virtuemart so that I can sell some extensions via a store front right here on the site. As part of my testing I run through the usual user experience to check that things work as they should and found that after registering a user, confirming the account and then being enabled by an administrator the 'You cannot access the private section of this site.' message was displayed and the new user could not log in.

Hmmnnn, not good. 

So I check the ACL to ensure that the 'registered' user level has login access to the site. All good there so that isn't the issue. I then turn to Google to see what that turns up and find that most of the solutions given relate to the ACL permissions.

Continue reading
3924 Hits
0 Comments

Virtuemart Revisited

Virtuemart Revisited

Over time I have gone through various stages of selling mods and extensions and somehow every time have ended up vowing never to do it again. I think in retrospect this has mostly this has been due to the piracy that seems to go hand in hand with the web extension community and the frustration that you get when you get your hard work ripped off by some snotty little script kiddy. In every case, the mods and extensions that I have written have ended up being released open source and for free. In fact these same mods and extensions are still available on the downloads page. 

As you can see by the date on most of those items, it has been a few years since I have actively developed stuff for a wider audience. Most of the stuff I wrote was for the Boonex Dolphin platform, and whilst I ended up moving away from Dolphin to Joomla and JomSocial I never bothered to release any of the modifications, plugins and extensions that I had written for my sites on the Joomla / JomSocial platform.

Recently I have been developing some interesting things and have been toying with the idea of releasing them for sale, I also have the Dolphin to JomSocial migrator that I have up until now not made available to the public. So with a renewed interest in once again selling mods and extensions but this time for the Joomla / JomSocial platform I decided to put a recent plugin that I wrote up for sale.

The plugin is a simple extension for JomSocial that automatically adds new members to a JomSocial group. I wrote this simply because the only available version that I could find to purchase required an expensive 3 month subscription purchase to download. Something as simple as this is not worth the $30  subscription price that was being asked so I decided it would be better/cheaper/easier write my own. Having written it I could also see an opportunity to sell it to others who wanted the plugin but did not want to cough up the subscription for just one extension.

Continue reading
2750 Hits
0 Comments

Fix your painfully slow PHP mail() function.

Fix your painfully slow PHP mail() function.

Having moved all of my sites to the Excellent Digital Ocean hosting I noticed that on some sites the php mail function seemed to be painfully slow and in some cases threw up some error messages telling me that it had failed. Googling didn't turn up too much in the way of solutions, most information seemed to suggest that the sendmail or postfix packages be installed instead.

Whilst sendmail and postfix are both great solutions, I did not really want to install a fully fledged mail server on my box as all email handling for my domains is handled on a separate server. It seemed like too much of a waste of resources so I decided to simply fix the issue with the php mail() function. 

After doing a bit of digging I discovered that the issue lay with the hosts file. The host info was incorrect.

Editing the hosts file is pretty easy to do, but first you will need to know what the current hostname is set to. To do this simply type in the following command at the command prompt

Continue reading
3498 Hits
0 Comments

Cloning your Joomla site

A while back I was working on a project that allowed replication of an instance of Joomla. The reason for this was that I have a couple of sites that are set up as SaaS applications. Rather than use the traditional method of selling access to multiple user accounts on a single site I needed to provide complete anonymity between users. The nature of these apps were that all data is private and for me the best way to manage both the segregation and anonymity was to provide completely separate sites for each user. 

I wanted to use a basic site as a template and then replicate it for each user. This meant replicating both the physical files and the database information for each subsequent user.

I had previously used JMS multisites but had found the component to be a bit overly complicated and limiting when used in a commercial capacity as licenses were required for each replication. It also did not do exactly what I required. I did have a look at modifying the code to do what I wanted but in the end my solution was to simply write my own component.

For my setup I required that each instance had it's own subdomain, but that users could log in from the main domain. Each instance was also created from creating a subscription on the main domain.

Continue reading
3938 Hits
0 Comments

User Clearout

I've deleted a bunch of old user accounts that were either never enabled or never revisited the site after being enabled. In the very highly unlikely possibility that you had an account and find that it has been deleted you will need to rejoin.

Tags:
1070 Hits
0 Comments

Downloads now available again

The downloads section is now back up and running. 

All available downloads can now be downloaded without having to log in or become a member.

If there are any missing downloads or broken links please let me know

/DM

Tags:
1050 Hits
0 Comments