Monthly Archives: July 2014

how to easily encrypt your files

EncryptMe

Keep the spooks and data thieves out of your personal data with this easy-to-use, drag-and-drop 128-bit AES encryption applet. It’s a simple 1-2-3 process:

 

1. Download EncryptMe, copy to your Applications folder and drag the icon to your Dock.

Download link…📀
Encrypt Me (small)

 





2. Select the files you want to encrypt and drop them onto EncryptMe’s Dock icon.

Add files


3. Choose a password and you’re done!

password

That’s really all there is to it, but let’s take a moment to go over the details of Step 2 and 3.

 

How does it all work?

First of all, note that EncryptMe is an Automator “droplet” app. That means you use it by dropping files on it, not by clicking or double-clicking the icon (which will just produce an error message). If you want to know how EncryptMe works (or make your own), just open up Automator.app and take a look a the ‘New Disk Image’ action. EncryptMe sizes the disk image to fit the files you drop on its icon as long as you have enough free space on your drive.

automator action

Secondly, take a moment to pause and think about the password options. You can use OS X’s built-in password generator or make one up of your own. However, be careful. This encryption won’t just keep the bad guys out; it’ll keep you out too if you forget the password!

For that reason, you’ll need to think carefully about whether you’re going to tick the ‘Remember password in my Keychain‘ checkbox or not. Doing so gives you far more insurance against losing the password. The flipside is that anyone will be able to access your encrypted files if they gain access to your computer while you’re logged in. Leaving the box unchecked is more secure: the password you set here will have to be supplied every time an attempt to open the files is made even when you’re logged in. The bad news? Forget the password, and you’ll be in the same boat as the spooks and the data thieves, locked out of your data forever. So choose carefully here.

pwd generator





Xcode: adding source control

source control main

If you’re not yet using source control with your Xcode projects, it’s something you want to seriously consider before a project you’re working on hits serious trouble. Setting up source control is easy when you create a new project (just tick the box in the project set up window), but figuring out how to add it to projects you’ve already created is a bit more challenging. In this post we’ll look at the ‘why’ and the ‘how’ of adding source control to an existing project.

Why?
In most normal applications, ‘Command-S’, Versions, Time Machine or other back up will save your hide when you either lose a document or realise a whole bunch of recent changes are something of a disaster. Recovering or reverting a document are mechanisms Apple has put a lot of time and effort into since Lion first appeared (changes I haven’t always been a fan of…).

However, these mechanisms do not work well with Xcode due to the complex and deep links between files in an Xcode build. If you’ve ever tried to go back to an earlier version of an Xcode project or undo some change from last week, and ended up with a headache, you’ll know what I’m talking about.

That’s what snapshots are for, you say? Yes, maybe. When they work. But in my experience snapshots themselves get lost, corrupted, or simply fail to restore.

Moreover, source control has other benefits aside from recovery and reversion that neither snapshots or any other mechanism provide. It’s primary purpose is to allow you to develop parallel but different versions of your project at the same time (a process known as ‘forking’). What if you want to experiment with adding some new feature, but don’t want to risk making changes right across your code that would be needed to try it out? What if you want to create one version of your project for one set of users and another one for others, or one version for an earlier OS X iteration and another for the current release?

How?
Let’s get down to the nitty gritty. Let’s assume you’re convinced you want to add source control to your current project. The first thing you’ll need to do is install git if you haven’t already. If you’re not sure, open Terminal and enter

git --version

If you get back a version number, continue on to the next step. If not, you’ll need to install git first. Follow the instructions for doing that here and then return to this post.

Once git is installed, here’s the steps for adding source control to your existing repository:


1. Locate the project folder
Select the project in the sidebar on the right, and click the little ‘Open in Finder’ arrow on the right.

locate parent folderl

Once you’ve got the parent folder open in ‘Finder’, quit Xcode.


2. Open Terminal and switch to the project’s parent folder
Click on the project’s parent folder icon in Finder and drag it to a Terminal.app window. Hit ‘control-A’ on your keyboard to move the cursor to the beginning of the line and type ‘cd’. Press ‘return’ to complete the command.

I always like to do a quick ‘ls’ to double check I’m in the folder I think I am, and that it contains what I think it does.

terminal 3


3. Initialize, Add, & Commit
Next, we’re going to hit a series of Terminal commands, one after the other. Press ‘return’ on your keyboard after each one:

git init
git add .
git commit -m "Initial commit"

Notice that there’s a period after a space on the end of the second command. Don’t forget to include it.


4. Confirm your local repository
Reopen Xcode, and hit the ‘Source Control’ menu. You should now see the options are active.

source control menu
Congratulations! You just added a local repository to your project. You can now go ahead and start creating branches (‘forking’) by choosing the Source Control > master > menu item.

You’ll notice that when you make changes in your Xcode project, an ‘M’ (‘modified) will appear next to the files that have been changed. When you’re happy that these are changes that you’re going to keep, use Source Control > Commit. Full documentation on how to use the various features of source control are available in Xcode’s documentation.


5. Add a remote repository
Local repositories are great, and may be enough for your needs, but for ultimate protection (such as against disk loss or failure), you might want to add remote back up. To do that, you’ll need an account with a service like GitHub or Bitbucket. My own personal preference is Bitbucket, largely because they allow you to have private repositories on a free account. Steps for adding your existing project to a remote repository can be found on your chosen service’s website. If you’re using Bitbucket, the general method is first create a new repository on the Bitbucket site and copy the link. Then, enter each of the following in Terminal, replacing the dummy text in square brackets with your actual values (remove the square brackets, too).

cd [path to your repo]
git remote add origin [url to your repository]
git push -u origin --all
git push -u origin --tags

After that, re-open your project in Xcode and you should be all set up. Check by ensuring the remote path is shown in Source Control > –> master > Configure…


how to remove Google’s secret update software from your mac

don'tbeevil
If you’ve ever downloaded Chrome, even for just a trial (guilty!), you might not be aware that Google have slipped a little bit of hidden software into your Library.

This software is called Google Updater, and it secretly “calls home” on a regular basis and downloads updates to your Google software without either asking before, or notifying you after, doing so. In Developer circles, this is considered very shady practice. Users should be asked for consent and informed when software makes changes to either itself or the user’s computer, and ideally those notifications should tell the user what has been changed and how the changes could impact them.

Before I beat this drum any harder, however, I owe you at least the other side of the story. If I worked for Google, I’d probably come up with this response: “Hey look, a major source of computer virus and malware infections is that users are often using out-of-date software that hasn’t been patched to combat newly-discovered exploits. No matter how much we tell users to keep ther software up-to-date, the truth is the majority don’t. We provide an automatic updater so that users don’t have to worry about it, and can be assured they’re always using the latest and safest version of our software”.

I’ve heard this argument so many times, I don’t doubt it’s something close to what Google would actually argue. My problem with this is that while automatic updates can be a good thing if they’re security related, it’s not at all clear why an app should be updating itself automatically for any other reason, or why it’s updating itself without providing notifications about when and what updates were made.

If an independent developer did that, they’d almost certainly find their software labelled as “suspicious” at best, and “dangerous” at worst. The fact that Google is a multinational, global enterprise with a stranglehold on the internet, and which is often tangling with the law in countries throughout the world, may make you feel more or less confident that they can be trusted more than independent developers, whose income depends very much on their reputation. I’ll leave that one for the reader to decide. 😉

Do I have Google Updater?
To see if you’ve got Google Updater hiding on your system, try this quick test in Terminal. Triple click the line of code below to highlight it.

defaults read com.google.Keystone.Agent

If you’ve previously installed my Terminal workflow, just hit control-opt-cmd-T or right/control click and choose “Services > Run in Terminal” from the contextual menu. Alternatively, if you have my free utility app FastTasks 2, the Analyser’s Profile view will show you if Google Updater is installed (see ‘Locate Google Updater’ below for the locations to check in the profile view). Elsewise, manually copy and paste it into a Terminal window.

If the result comes back as

Domain com.google.Keystone.Agent does not exist

you’re fine. Google Updater has not found its way into your system. Anything else and you’re going to need to decide whether you want to remove it or not. If you’re a regular Chrome user, keeping Updater might prove convenient, though you’ll have to live with the idea that the app is updating itself in ways over which you have no control. If you rarely or never use Chrome, there’s no reason to have this hidden process regularly calling home to Google every time you’re connected to the net.

How do I remove it?
You have two options. You can either disarm it or you can nuke it. Disarming it is simplest, it’s a one-line Terminal command:

defaults write com.google.Keystone.Agent checkInterval 0

This command tells the Updater how often to “call home”. A value of 0 basically means ‘never’. Disarming it is probably better than nuking it if you still keep Chrome on your system and use it occasionally. You can temporarily set it back to something like ‘once a week’ from time to time to check for security updates with

defaults write com.google.Keystone.Agent checkInterval 604800

Nuking the Google Updater is a bit more complex. You’ll want to run some uninstaller commands, and then you’ll want to go and clear up the crud that is still left behind. And before you can do either of those, you need to find out where it’s hiding. So, we have a three-step process.

1. Locate Google Updater
Triple click the first of these two lines, and choose ‘Services > Reveal in Finder’ from the contextual menu (that’s another right-click or control-click on the selected line), and then repeat for the second line:

~/Library/Google
/Library/Google

You will likely get the error message “The operation can’t be completed because the item can’t be found” from one of these lines, but not the other. Note that the difference is all in the presence or absence of the tilde ~. Make a note of which one worked, and run the appropriate commands in step 2.

2. Run the uninstaller commands

Run these in Terminal (again, triple clicking to highlight and doing the usual trick afterwards with shortcut key or Services menu if you have my workflow installed), one at a time:

If the Updater was in your user library (with the tilde ~), then first do this (it’s all one line):

Update: please read the Comments for latest commands
python ~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/\
Contents/Resources/GoogleSoftwareUpdateAgent.app/Contents/Resources/\
install.py --uninstall

then this:

touch ~/Library/Google/GoogleSoftwareUpdate

If the Updater was in your domain library (no tilde ~), then first do this (it’s all one line):

sudo python /Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/\
Contents/Resources/GoogleSoftwareUpdateAgent.app/Contents/Resources/\
install.py --uninstall

and enter your Admin password (note that you won’t see any indication of your password being typed in the Terminal window). Then do this:

sudo touch /Library/Google/GoogleSoftwareUpdate

3. Clear up the crud
If the updater was in your user library, open that now and go to

~/Library/Google/

and delete the folder called ‘GoogleSoftwareUpdate’. If you don’t use any other Google software (I don’t), you can just delete the entire ‘Google’ parent folder.

If the updater was in your domain library, search for the same folder and send it to the trash. You will need to give Finder your admin password to authorise the move.

Next, let’s just check the uninstaller was successful. Look for the following. If you don’t find them, good (the installer did its job). If you do, help them on their way to oblivion by sending them to the trash:

~/Library/Caches/com.google.Keystone.Agent
~/Library/LaunchAgents/com.google.Keystone.agent.plist
~/Library/Preferences/com.google.Keystone.Agent.plist

If you’ve deleted Chrome from your Applications folder too, then you might as well hunt down and exterminate its prefs list while you’re at it:

~/Library/Preferences/com.google.Chrome.plist
The following sources were used in researching this post:
http://wireload.net/products/guu-google-update-uninstaller/
http://raamdev.com/2008/howto-remove-google-software-update-on-mac-os-x/
http://blog.slaunchaman.com/2010/06/30/google-earth-now-available-without-automatic-updates/
https://support.google.com/installer/answer/147176?hl=en
‘Don’t be evil’ picture was remediated from here.

%d bloggers like this: