All posts by mactips

10.9: Preferences are cached

There are many hints here and on the net involving changing user defaults by running defaults write or directly editing the .plist files in Library/Preferences. Until 10.9, restarting the program was enough to apply the new defaults.

Since OS X Mavericks, the defaults system is caching the preferences system-wide (i.e. not in the application’s process!) to improve performance of the user defaults API. If you use the defaults command, you are fine, since it appears to use the normal user defaults API.

On the other hand, if you edit a preference .plist file with a text or plist editor (even the one included with the most recent Xcode 5 preview), the cache will not be flushed and even after restarting the program in question, it will retain the old preferences.

The API documentation states that the cache is synchronized with the on-disk plist file contents periodically, but does not indicate how often, let alone how to flush the cache manually.

Logging out and back in appe …

Source: Mac OSX Hints

  

Service to "Make Protected Zip" files

Mac OS X has long supported password encrypted zip files, but you have to use command line to do it. So here is a simple Automator based Service to give you a GUI.

OpenAutomator and choose “Service” (the gear). Change “Service receives selected” to Files or folders in “Finder.app”
Add the “Run Applescript” step and then copy the code below and replace all the code in the “Run Applescript” command with this code.

Choose save, naming it something like “Make Protected Zip”, then test it by going to the finder and selecting one or more files/folders. Scroll down to the “Services” Menu and select the service with the name you just saved as.

on run {input, parameters}
set dialogResults to display dialog “Name for zipped file (no extension)” default answer “Archive” buttons {“OK”, “Cancel”} default button “OK”
if button returned of dialogResults is “OK” then
set passwd to …

Source: Mac OSX Hints

  

Get iOS 7 to remember passwords even for sites that don't want it to

iOS 7 uses iCloud to store your passwords for websites you log into. But sometimes, by default, Safari won’t prompt you to save passwords for certain sites—sites that explicitly request that web browsers not save such data.

But they’re your passwords, and Apple clearly thinks you deserve a vote on whether your iOS device saves them. Head over to the Settings app, tap on Safari, and then tap on Passwords & Autofill. Enable the Always Allow setting, and Safari will now be willing to save every single password you enter, even on sites that attempt to disallow that option.

Source: Mac OSX Hints

  

Use dseditgroup to allow users access to services (ssh, screen sharing, and more)

Want to add a user to a specific group using the command line? dseditgroup is your friend! Add users, or groups, to a group you create or system groups which control access to services.

Make sure to insert your local admin’s short name (localadmin) and the user (username) or group (groupname) you’re trying to add.

Remote Login (SSH)
User: dseditgroup -o edit -n /Local/Default -u localadmin -p -a username -t user com.apple.access_ssh
Group: dseditgroup -o edit -n /Local/Default -u localadmin -p -a groupname -t group com.apple.access_ssh

Screen Sharing
User: dseditgroup -o edit -n /Local/Default -u localadmin -p -a username -t user com.apple.access_screensharing
Group: dseditgroup -o edit -n /Local/Default -u localadmin -p -a groupname -t group com.apple.access_screensharing

Print Administrators
User: dseditgroup -o edit -n /Local/Default -u localadmin -p -a username -t user _lpadmin
Group: dseditgroup -o edit -n /Local/Default -u localadmin -p -a groupname -t …

Source: Mac OSX Hints

  

Use AppleScript and Remote Desktop to set a non-default NetBoot startup disk

The following AppleScript will use Remote Desktop to set a non-default NetBoot image as the startup disk. Make sure to insert your server’s IP Address and the image name…

tell application “Remote Desktop”
set theServer to “192.168.1.8”
set theImage to “10.8.5 NetBoot”
set theComputers to the selection
set theTask to make new set network startup disk task with properties {from server:theServer, mount volume:theImage, restarting:true}
execute theTask on theComputers
end tell

Source: Mac OSX Hints

  

#SquareCMD Episode Eighty One: Export iPhone 5S Slow-mo Footage.

By brolloh The slow-mo camera functionality is a superb creative addition on the iPhone 5S, we’re sure like us your first test was to film a running tap (if not, try it!). With the move towards video on social media platforms well underway with the likes of Vine’s 6 second Twitter friendly creations and Instagram’s 15 second alternative, slow-mo gives us a new avenue to explore. Getting slow-mo video into these apps is more hassle than it needs to be though!
Filming a slow-mo clip in the default camera app gives you the option to define when the slow motion portion will begin and end and save it in the camera roll.

Open Instagram or Vine and import this video however and you’ll find your slow-mo section is nowhere to be found.
Until developers or Apple (we’re not sure which) allow slow-mo creations to be imported or exported, we have to find an alternative route – there are two options.
What we need to do is force your iPhone 5S to package the video, as it stands presently your video is at the mercy of its own player (the one that defines slow-mo sections). The first option is one of the oldest tricks in the book – email the clip to yourself.

You’ll receive the video as a .MOV file which you can then save back to the camera roll, Instagram and Vine will both play nicely with this file.

The second option, and the one we prefer if you have a friend nearby, is to use Airdrop. The slow-mo video file will be created in the same way as emailing yourself, but far less compression is used when compressing the file for sending resulting in better image quality. Airdrop to your friend, get them to Airdrop it back and you’re away – a packaged slow-mo file will be waiting for you in the camera roll, Instagram ready!
Come back soon for more.

Source: SquareCMD

  

Pinch and zoom the cover art album browser in the Music app

When you turn your iOS 7 device to landscape (horizontal) mode in the Music app, you get a lovely grid of album cover art from the music in your library. You can tap on one to see that album in details.

But you may not realize just how interactive that grid is. You can swipe across it to drag other album covers into view. But even better, you can pinch and zoom to change how many album covers fit onto the screen at a time.

Source: Mac OSX Hints

  

Let Siri give a random number

Siri can returna random number, letter, or word.
After reading Lex’s hint about rolling the dice and flipping a coin, I decided to see whether Siri can generate random numbers. It can have Wolfram do it. You can speak “random number” (which it interprets as “random integer”), “random integer”, or “random real”. You can also specify ranges, such as “random number between ten and 100” or “random real between 20 and 30”.

“random word” and “random letter” also work.

Source: Mac OSX Hints