Tech Thought

Tech tips, hints, and general musings. PHP, Perl, Mysql, Javascript, AJAX, JSON, Linux, Mac OSX

Entries for the ‘How To’ Category

How-to Fix: The application-identifier entitlement is not formatted correctly

A new error has started showing up when submitting iPhone Apps through iTunes Connect: “The application-identifier entitlement is not formatted correctly; it should contain your 10-character App ID Seed, followed by a dot, followed by your bundle identifier.” From what I can tell, the way to fix this to create a NEW entitlements file (see [...]

Comments (1)

How-To: Force VMWare Restart/Shutdown (Mac)

I love using VMWare Fusion on Mac, it’s perfect as I can run everything I need on one machine, and minimise my exposure to windows.  However, sometimes things go astray – windows “goes to sleep” and won’t come back to allow me to restart or shutdown the virtual machine.  How do you fix this? Hold [...]

Leave a Comment

How To: PHP OAuth Twitter

So, you’re building a web based twitter client in PHP.  Easy, just use a simple Twitter API client and call the Twitter API directly.  But what if you don’t want to store the user’s Twitter authentication information anywhere?  It’s a security risk anyway and some people don’t want to give up their account details to a [...]

Comments (4)

How-To: Remove Applications from Startup (Mac)

To remove applications that start automatically when you boot up is a simple process on the Mac, however still one that I get asked by friends and family regularly how to control. To manage the applications that launch when you first boot up, follow these steps: Click the Apple Icon in the top left corner [...]

Leave a Comment

How-To: Backup all files on your Mac or PC

Okay, I normally don’t come straight out with a non-technical answer to something like “what’s the best way to backup all my files?”, except that there is a really really simple way to do this. Backblaze is a backup-to-the-cloud service which costs $5 a month for unlimited backups. It deals with external hard drives, duplicate [...]

Leave a Comment

How-To: Check root DNS settings for domain

Using “dig” you can determine what IP address or CNAME your domain is pointing to quite easily. However what I didn’t know was that you can actually check what the root server thinks your domain is pointing at, so you can check if its set correctly when you are migrating to a new IP address. [...]

Leave a Comment

How-To: Flip Rows/Columns in Excel

This is really easy, but something I never knew until I just tried this: Copy the cells you want to flip Right-Click “Paste Special” Tick the Transpose checkbox You’re done! Best Excel trick ever!

Leave a Comment

How-To: Recursively remove .svn folders

Okay, so you’ve accidentally adding a bunch of files to SVN.  Or, you need to copy a bunch of files but you don’t want to take the .svn folders with you.  How to get rid of these?  On any *nix machine (Mac included) you can run the following command: rm -rf `find . -type d [...]

Comments (1)

How-To Fix: MAMP won’t start

Okay, so sometimes our shiny friend and development support buddy MAMP won’t start properly.  I’ve found this often happens when you’ve first booted up your Mac and you try to start getting stuck into your code. Symptoms are pretty simple to diagnose – you start MAMP, and it’s control panel pops up and shows that everything [...]

Comments (2)

How-To: Move change the address of a SVN repository

So you’ve changed where you host your subversion repository for a particular project and you want to update your local copy so that it points at the correct address?   How do you do this?  Simple: svn switch –relocate http://oldserver.com/PROJECT  http://newserver.com/PROJECT This will recursively modify all the .svn folders contents so they point to the correct [...]

Leave a Comment

How To: Fix iCal slowness

So you’ve been using iCal for a while, and suddenly it starts working very slowly… One solution I found was to remove your calendar from your computer and let iCal download it from your server (ONLY use this if you use server based calendars): Open terminal and type: rm -r ~/Library/Calendars/ Various solutions are discussed here.

Leave a Comment

How To: Determine Folder Size on Mac OS with JDiskReport

Okay, so you’ve got a big folder full of stuff, its got a complicated directory structure and you want to know what what folders are taking up all the space.  Simple?  Well, no – not really.  Unless you have something like JDiskReport. JDiskReport is a Java based application that traverses your folder structure, and gives [...]

Leave a Comment

Objective-C: Calculating Days, Minutes, Hours from seconds

If you need to convert a total number of seconds into specific components (days, hours, minutes and seconds) in Objective-C, you can use this code snippet.  You can probably do this a million other ways, but this works beautifully for me:     NSNumber *valueForDisplay = [NSNumber numberWithDouble: [self valueForDisplay:clockName]];     NSNumber *totalDays = [NSNumber numberWithDouble: [...]

Comments (5)

How-To: Create UIActivityIndicator in iPhone NavigationBar (UINavigationBar)

This is a simple code snippet that can save you hours of mucking around trying to place your activity indicator (spinning icon) in the Navigation Bar of the iPhone.  This example assumes that your view controller has a property of type UIActivityIndicatorView called “self.activityIndicator”: // Create a ‘right hand button’ that is a activity Indicator [...]

Comments (8)

How-To: Convert a string to NSDate

In Objective-C, you commonly nead to convert a string to an NSDate object.  A simple way to do this is using the NSDateFormatter object.  It provides the dateFromString method which converts a string into an NSDate object.  You do, however, need to tell NSDateFormatter the format the date will be in.  See below example: NSDateFormatter [...]

Comments (4)

How-To: Rotate video with Quicktime Pro

Common mistake – you take a video with your mobile phone or digital camera, and you hold it horizontally.  Looks great until you take it home and open it up on your computer and you have to spend the entire video watching it with your head tilted 45 degrees. How to fix this?  You’ll need [...]

Comments (2)

How-To: Convert PDF to KeyNote

We had a nice big set of pages in a PDF which we wanted to convert into a KeyNote presentation.  Thankfully, this process is really easy due to Melissa O’Neill’s PDF to Keynote application.  Simply load it up, give it the PDF, tell it where to save the KeyNote file – and you’re done!  Thanks [...]

Comments (1)

How-To: Automatically sync your iTunes library with all your computers

I’ve come across a problem – my main computer (a MacBook Pro) has all my music on it, and is hooked up to my iPhone. But I’ve just got a nice big flat screen TV and its connected to my stereo. So I want to be able to play music/movies I buy on iTunes through [...]

Leave a Comment

How-To: Redirect to different URL using Javascript or META tags

If you need to redirect from one page to another, you can achieve this with either a META tag redirection or Javascript.  See below for an example.  You should provide a manual link as not all browsers support META tags – and javascript won’t work if its been disabled: <html> <head> <title>Move my domain!</title> <meta [...]

Comments (1)

How-To: Fix Problems with Google Maps and Internet Explorer: Grey Background, Clipping, Off centre etc

We’ve just developed a Google Maps application – all using Firefox – and started to test it in IE.  We were shocked to find that our map looks completely off centre and have a big grey backround across them.  Moving the map with the mouse causes them to clip and look shocking! See below: So [...]

Comments (1)