Random thoughts & observations

From the mundane to the profound and everything in between here’s what’s rocking our world

Suppressing JSHint mixed spaces and tabs warning

Posted: Thursday 24th March, 2016 - 7:01pm
Author: James Griffiths

If you've been using JSHint for an extended period of time you may have encountered warnings being printed to the console akin to the following:

scripts.js: line 23, col 1, Mixed spaces and tabs.
scripts.js: line 44, col 1, Mixed spaces and tabs.

This warning occurs as JSHint will not allow spaces and tabs to be used together.

Switching this off is quite easy...


Fixing Xcode 7.2 issue with Missing iOS Distribution signing identity error

Posted: Tuesday 23rd February, 2016 - 6:56pm
Author: James Griffiths

Here's another Xcode 7.2 error we encountered while attempting to validate an iOS archive prior to submission to the Apple App store:

Failed to locate or generate matching signing assets

Xcode attempted to locate or generate matching signing assets and failed 
to do so because of the following issues.

Missing iOS Distribution signing identity for ... Xcode can request one for you.

Fixing this is, thankfully, quite easy...


Resolving Xcode 7.2 issue with Cordova CDVViewController.h file not found

Posted: Monday 22nd February, 2016 - 6:52pm
Author: James Griffiths

If you're using Cordova PhoneGap and have recently upgraded to Xcode 7.2 you might be experiencing the following build error when attempting to create an archive for submission to the Apple App store:

Cordova/CDVViewController.h file not found

It's an odd one because you've double checked your software installation; PhoneGap and Xcode are up to date and you can publish the app to an iOS device for testing without issue.

As this only happens when creating archives for app submissions the error doesn't seem to make any sense whatsoever.

Thankfully the solution is incredibly simple to implement...


Dealing with Git unlink file errors

Posted: Wednesday 17th February, 2016 - 6:45pm
Author: James Griffiths

Chances are when using Git for your version management needs you may have encountered an error warning in the terminal similar to the following:

Counting objects: 2106547, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (269562/269562), done.
Writing objects: 100% (2106547/2106547), done.
Total 2106547 (delta 636114), reused 2106547 (delta 636114)
Unlink of file '.git/objects/pack/pack-105e2cad4265551672452c ... 5127bac40.pack'
    failed. Should I try again? (y/n)

Pretty annoying right?

Fixing this is actually pretty simple...


Exploring ECMAScript 6 - Array manipulation

Posted: Saturday 6th February, 2016 - 6:38pm
Author: James Griffiths

ECMAScript 6, commonly referred to as ES6, is the latest ECMAScript language specification that defines the standards for implementing JavaScript in web browsers. ES6brings with it lots of powerful new features that provide developers with more flexibility than ever when crafting their applications.

In the following article we're going to take a look at manipulating arrays in ES6.


Remove an item from a JavaScript array by value

Posted: Monday 1st February, 2016 - 6:35pm
Author: James Griffiths

No matter how much you work with a given tool there will always be those 'aha' moments when you learn something new that you didn't realise was possible before.

One of those 'aha' moments was when we discovered the filter method in JavaScript.


Using the revealing prototype pattern in JavaScript

Posted: Saturday 30th January, 2016 - 6:28pm
Author: James Griffiths

When developing applications with JavaScript you quickly realise the need to architect and structure your code in a way that's modular, scalable and efficient.

Due to JavaScript's flexibility there are many ways this could be achieved; some better than others.

In this article we're going to take a look at how this could be achieved using the revealing prototype pattern and discuss the benefits and drawbacks of this particular design pattern...


5 Ways to keep your Mac laptop from overheating

Posted: Wednesday 13th January, 2016 - 6:26pm
Author: James Griffiths

Mac laptops are generally quite reliable but, like any equipment, they can develop faults and, if not properly maintained, are likely to become prone to frequent problems later on.

One of those problems may involve overheating.

Here are 5 steps you can take to minimise and reduce overheating on your Mac laptop...


Updating a range of records with MySQL

Posted: Friday 8th January, 2016 - 10:44pm
Author: James Griffiths

Updating a single record entry in a MySQL database table is fairly simple, but what if you need to update a batch of records with one single query?

It's not as difficult as you might think...


Removing the back button text in Ionic Framework Apps

Posted: Sunday 27th December, 2015 - 10:40pm
Author: James Griffiths

There's no doubt that the Ionic Framework makes developing Mobile Apps easier to accomplish but as great as the framework is the documentation can sometimes be a little lacking.

This is especially true where it comes to figuring out how to hide the back button text in iOS Apps.


htaccess rules for Perch CMS

Posted: Wednesday 23rd December, 2015 - 10:36pm
Author: James Griffiths

Perch CMS makes content management for small business clients a cinch.

The following htaccess rules help you get Perch CMS to load your website without interfering with accessing the admin console...


Undoing a local Git merge

Posted: Thursday 10th December, 2015 - 10:34pm
Author: James Griffiths

Git is a fantastic tool for managing project code within a team context but, as with any tool, there'll always be occasions when you run into problems.

One such problem might occur where you want to undo a local branch merge that hasn't been pushed to the remote repository. Sounds tricky right?

The following are ways in which this can be accomplished relatively quickly...


Resolving iOS9 page transition issues with Ionic Framework Apps

Posted: Wednesday 18th November, 2015 - 10:29pm
Author: James Griffiths

If you've recently upgraded to iOS 9 you might find an issue with your Ionic Apps when testing/running on native devices.

We found that using the ui-router logic resulted in navigation issues where the requested page would 'flicker' or 'jerk' slightly into view before sliding back and then finally transitioning into full view.

Not a very pleasant user experience but thankfully the Angular team have rolled out a fix for this particular bug that we can implement in our Ionic Apps for now.


Managing Cordova PhoneGap plugins from the command line

Posted: Friday 13th November, 2015 - 10:24pm
Author: James Griffiths

In the following mini-tutorial we'll look at how easy it is to add, find, list and remove plugins for Cordova PhoneGap projects using the command line.

We are going to assume that you have the following software installed on your system:

It's also assumed that you have some familiarity with using the command line.

If you can answer yes to all of the above let's get started!

Page 2 of 9