0

Removing the whitespace from text files in Sublime

I like Sublime Text, it’s my favourite text editor. Handily available for OSX and Windows.

What’s annoying though is when you get given or open a text file that has loads of whitespace at the end of the lines. Aside from messing with my compulsive sense of order, there are cases when extra whitespace can cause problems for some applications.

Just in case, there’s a handy configuration option that can strip out trailing whitespace when a file is saved. Here’s how to set it up…

  1. Open Sublime’s preferences – in OSX this is done by “cmd + ,”
  2. Add the setting “trim_trailing_white_space_on_save” and set it to “true”
  3. Save the preferences file

Bingo! Whitespace will be trimmed when files are saved in future.

Just for clarity, the full setting in a fresh config file looks like this:

0

Some other TimeMachine exclusions

In my other post on the topic I excluded my local Mail app files from my TimeMachine backups because they were tripping over McAfee AntiVirus. I thought that it might be sensible to add a few other exclusions to trim down the total amount backed up and reduce the impact of frequent TM backups on my laptop.

201511324_151165-CapturFilesAs you can see, my total backup size is about 380Gb. Included in that are a fair few transient / temporary files that aren’t needed as well as some files that are backed up elsewhere anyway plus a handful of things that maybe I don’t need or want to back up.

Caches

Really, you want to keep them? I thought not. They include the browser caches for Safari and Firefox amongst other things.

  1. Click the “+” button.
  2. In the finder window that’s displayed, press Cmd + Shift + G.
  3. Enter ~/Library/Caches in to the path field and click Go.
  4. Click Exclude.

Downloads

You can download them again, right?

  1. Click the “+” button.
  2. In the finder window that’s displayed, select your Downloads folder.
  3. Click Exclude.

Trash

  1. Click the “+” button.
  2. In the finder window that’s displayed, press Cmd + Shift + G.
  3. Enter ~/.Trash in to the path field and click Go.
  4. Click Exclude.

Virtual Machines

This is a choice really. The VMs that I have can easily be rebuilt.

  1. Click the “+” button.
  2. In the finder window that’s displayed, select Documents / Virtual Machines.
  3. Click Exclude.

Sleep File

It’s a bit like the Windows hibernation file.

  1. Click the “+” button.
  2. In the finder window that’s displayed, press Cmd + Shift + G.
  3. Enter /var/vm in to the path field and click Go.
  4. Click Exclude.

Results

That’s better! TM is backing up 40Gb less than before and fewer of the transient files that really aren’t needed but change often.

201511324_171126-CapturFilesI could go further and exclude my Dropbox folder and iTunes Media too (as they’re stored elsewhere if I need them). That would shave another 200+Gb off.

0

Infected email breaking OSX TimeMachine backups

Having been away from home a lot recently, it had been a while since my laptop had been backed up by TimeMachine. After a few attempts though it got a bit annoying as McAfee kept interrupting the process. The problem seemed to be that the backups contained infected emails:

201511324_151187-CapturFilesMcAfee was blocking TM from writing infected emails to the backup drive.

As it turns out, I recalled fixing this once before (although I never blogged about it). So how could it have come unpicked? Looking at my TM backup exclusions, the exclusion that I added was still in place:

201511324_151132-CapturFilesBut my whole mail folder should be more than 8KB!… Then it clicked. I hadn’t done a TM backup since updating to OSX El Capitan.

After clicking the “+” button to add a new rule, I navigated to my mail folder.

  1. In the finder window, hit Cmd + Shift + G.
  2. Enter ~/Library/Mail
  3. Click Go

Aha! There’s now a “V3” folder…

201511324_151100-CapturFiles

I selected it and clicked “Exclude”. Bingo! 5.5Gb sounds more like it.

201511324_151165-CapturFilesAnd like that, TimeMachine works again.

0

Open Orchestrator JNLP files on OSX

New job. New laptop. But of course it isn’t set up like the old one. It doesn’t have all of the tweaks that I made over the years on it.

One annoyance, what with me being a heavy and frequent user of vRealize Orchestrator, is that client.jnlp files downloaded from the vRO web interface don’t have an application association by default. I’m writing this as a quick reference just in case I need it again anytime soon.

  1. Having downloaded and saved the client.jnlp file as normal, use the finder app to select the file, right click and select “Open with > Other…”.
  2. Browse to this path: /System/Library/CoreServices
  3. Select the executable Java-Web-Start.app
  4. Tick the “Always Open With” option.
  5. Click “Open”.

201511314_231188-CapturFiles

Done!

0

Multimon: Software My Chiropractor Made Me Buy

Well, he didn’t exactly do that. The big frown and look of disapproval at the photo I had been instructed to take of my work area told me almost all I needed to know about what he was about to say.

I work from home quite often and although I’ve never had a problem with how my desk is arranged etc, it came up when I needed to visit a chiropractor for the first time in my life. He wasn’t too impressed with where my laptop was on my desk and my second screen that I used for my Fusion VM, Twitter and my less used apps. After he explained all of the reasons why, he then proceeded to suggest what I needed to do to remedy the problems that he perceived. I’ve taken his advice and interpreted it in the way that suits my methods of working best.

Instead of raising the height of my laptop by about 12 inches, I’ve demoted it to “second screen” status and ¬†rarely run anything on it whilst it’s on my desk. My second screen has been promoted to primary display and its height and position are where my chiropractor would want them. I’ve even replaced it with something bigger and better so that I have oodles of desktop space.

Great. The problem now is that OSX (Mountain Lion) is quite frankly pants at handling multiple displays and I don’t want to spend ages rearranging desktops and application windows every time I unhook my laptop to go to the office or a client site. Supposedly the next version of OSX (called Mavericks presumably because they ran out of big cat names) fixes a lot of these problems but I think I’ll go mad waiting for it.

In the meantime, Multimon does exactly what I want it to do. It remembers settings for different monitors, duplicates application menus on different displays, can resize and reposition app windows via shortcut keys and restores my app window positions when I reconnect and disconnect the external display.

I suspect he won’t let me deduct the cost of the software from the fee for the next appointment I have though…