Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Service to "Make Protected Zip" files Apps
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 ""

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 text returned of (display dialog "password for zipped file" default answer "password" buttons {"OK", "Cancel"} default button "OK")
		set archiveName to text returned of dialogResults
		tell application "Finder"
			set archiveFileName to archiveName & ".zip"
			-- Append on a number if file exists.
			set suffix to 1
			set theFileExists to true
			repeat while theFileExists
					set archiveFile to ((container of (item 1 of input) as Unicode text) & archiveFileName)
					if exists file archiveFile then
						set archiveFileName to archiveName & suffix & ".zip"
						set suffix to suffix + 1
						set theFileExists to false
					end if
				end try
			end repeat
		end tell
		set itemStr to ""
		repeat with thisItem in input
			set itemPath to quoted form of (POSIX path of thisItem)
			tell application "Finder"
				set parentFolder to POSIX path of (container of thisItem as alias)
			end tell
			set itemStr to itemStr & " " & itemPath
		end repeat
		set zipFile to quoted form of (parentFolder & archiveFileName)
		set cmd to "zip -P " & passwd & " -rj " & zipFile & " " & itemStr & " -x *.DS_Store"
		do shell script cmd
	end if
end run
  Post a comment  •  Comments (14)  
  • Currently 4.25 / 5
  You rated: 5 / 5 (8 votes cast)
[8,677 views]  View Printable Version
Get iOS 7 to remember passwords even for sites that don't want it to iOS devices
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.
  Post a comment  •  Comments (9)  
  • Currently 3.11 / 5
  You rated: 5 / 5 (9 votes cast)
[25,048 views]  View Printable Version
Use dseditgroup to allow users access to services (ssh, screen sharing, and more) System
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
Group: dseditgroup -o edit -n /Local/Default -u localadmin -p -a groupname -t group

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

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 group _lpadmin

-o specifies the operation (edit in this case)
-n specifies the domain (another example is /LDAPv3/ on an ODM)
-u is the admin user to authenticate with (use diradmin for network domains)
-p tells it to prompt for a password
-a tells it to add a user or group
-t specifies the type, user or group
  Post a comment  •  Comments (0)  
  • Currently 4.20 / 5
  You rated: 5 / 5 (5 votes cast)
[9,559 views]  View Printable Version
Shell script to delete all printers Printers
The following shell script will delete all printers. Make sure the file is executable after you create it (chmod ugo+x /path/to/


for printer in `lpstat -p | awk '{print $2}'`
echo Deleting $printer
lpadmin -x $printer
  Post a comment  •  Comments (3)  
  • Currently 2.57 / 5
  You rated: 3 / 5 (7 votes cast)
[7,627 views]  View Printable Version
Use AppleScript and Remote Desktop to set a non-default NetBoot startup disk OS X Server
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 ""
	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
  Post a comment  •  Comments (4)  
  • Currently 1.80 / 5
  You rated: 1 / 5 (10 votes cast)
[6,266 views]  View Printable Version
Let VNC viewers connect to currently logged in user Network
Want to connect with the currently logged in user when using a VNC viewer rather than seeing the Login Window (ARD 3.5/OS X 10.7 and later)?

sudo defaults write /Library/Preferences/ VNCAlwaysStartOnConsole -bool true
  Post a comment  •  Comments (4)  
  • Currently 3.33 / 5
  You rated: 1 / 5 (6 votes cast)
[11,842 views]  View Printable Version
Pinch and zoom the cover art album browser in the Music app iOS devices
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.
  Post a comment  •  Comments (1)  
  • Currently 2.33 / 5
  You rated: 2 / 5 (6 votes cast)
[6,977 views]  View Printable Version
Let Siri give a random number iOS devices
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.
  Post a comment  •  Comments (3)  
  • Currently 2.77 / 5
  You rated: 4 / 5 (13 votes cast)
[7,452 views]  View Printable Version
Roll the dice or flip a coin with Siri iOS devices
Over at Finer Things, David Chartier points out that Siri can help you play games of chance. Unfortunately, however, the virtual assistant can't necessarily help you win at said games. Still, you can use Siri when you need to flip a coin or roll a pair of dice.

Say "Flip a coin," and Siri will either announce that it's heads or tails. Ask Siri to "roll the dice," and you'll get a pair of numbers between one and six. You can't ask Siri to roll a single die. Or rather, you can, but you'll still get two numbers back.

Hardcore role playing game enthusiasts will need a separate app or actual dice hardware to roll dice with more than six sides; Siri's apparently not into D&D.
  Post a comment  •  Comments (3)  
  • Currently 1.17 / 5
  You rated: 2 / 5 (46 votes cast)
[8,179 views]  View Printable Version
Use TextEdit in native Full Screen mode Apps
Do you love TextEdit for its simplicity and elegance? Have you ever thought that it'd be great to use it in full screen mode? Here's how to achieve that. Apple has released TextEdit's source code as an example of an Xcode project; with Xcode installed, you'll be able to manufacture a version of TextEdit with full screen support.

Open TextEdit.xcodeproj and on the left, find the Interfaces folder and select the file DocumentWindow. Then, select the window; make sure you select the window itself and not one of the objects contained in it. On the right, you can see the different inspectors Xcode provides. You'll want to select the fourth, the Attributes inspector. There are a lot of changeable attributes of the window available, but what we're interested in is the full screen support. Change that to "Primary Window". Build and run the application. Presto, you have full screen support!

To get the finished, executable application, locate "" in the folder "products", right click on it and "Show in Finder". You can move or copy it to a place of your choice - you might wanna keep the original TextEdit application, just to be safe though.
  Post a comment  •  Comments (4)  
  • Currently 1.80 / 5
  You rated: 1 / 5 (5 votes cast)
[7,187 views]  View Printable Version