I’ve been using my MacBook for almost three years now, and it still bugged me that I wasn’t able to lock the screen with just a keystroke. I’m sure there’s some other post out there describing how to do this, but I couldn’t find it, so I am creating one.

The method combines two posts I found, one that tells how to Lock the Mac Desktop from the Command Line, and one tells how to Create Your Own Keyboard Application Launcher via Automator.

First, open up Automator and create a new Service.
Automator Service

Next, drag in Run Shell Script, and set “Service receives” to “no input” in “any application.”
Automator Run Shell Script

Insert in this command, which will essentially lock the screen:

/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend

Then save the service. I saved mine as “Lock Screen”.

Now open System Preferences and click on Keyboard. Once there, go to Shortcuts and click Services in the left column. Scroll to the bottom of the right column, and you should see your service under General. Click to the far right, then add your shortcut by hitting it on your keyboard.
Keyboard Shortcuts

Once it’s set, test it out, be amazed.

Mac screen locked

I have been working with custom post types in WordPress for several years now, but never really found a suitable solution for ordering any of the default or custom columns properly. By default WP will order all custom post types by date, which sucks if you want them to sort by menu order, their title, or some other custom column you’ve created.

Every tutorial I came across (not to say every single one out there is wrong) either didn’t work for me, was outdated, etc. So, here’s how I just started doing it.

Jump to post “Order columns for custom post types in WordPress”

So, I had this problem with a new virtual machine I installed in VMware Fusion where the aspect ratio was locked to 4:3 no matter how much I tried to resize the window. I didn’t understand what was going on since this was the third or fourth VM I had installed. There were a couple other things I had noticed, as well, like I wasn’t able to copy and paste to and from the VM.

I tried Googling and got nothing that helped me at all. I gave up. Yesterday, I was trying share between the VM and my MacBook and it told me that it couldn’t do it because the setup was still running…on a VM that was a few months old. I Googled that error and got an answer right away, had to unmount the floppy and cd drives while the VM was shut down, simple.

Once the VM was back up, I was able to install VMware Tools to do the sharing. Guess what else it fixed? The resizing issue.

So, there it is, if your aspect ration in VMware Fusion is locked and you cannot resize your VM window properly, or if you cannot copy and paste to and from your VM, then you need to install (or reinstall) VMware Tools.