Monthly Archives: November 2014
how to get back your Dock preferences
As I noted in an earlier post, one of Yosemite’s annoying usability regressions is that Apple have removed the Dock Preferences from the menu.
I was so irritated by this that I thought I’d just slip them back in to the menu bar. 😉 Hence, FastTasks 2 from v1.6 onwards now lets you manage most Dock preferences from the menu bar again!
how to detect WireLurker malware
Security researchers have this week been getting themselves het up about a new malware threat to both iOS and OS X. WireLurker appears to be emanating out of Chinese file exchange sites and, at least at the moment, looks fairly limited in both its spread and its damage (update: Business Insider is reporting that Apple has blocked WireLurker-infected apps from launching).
However, researchers at Paolo Alto Networks are pointing out that what makes WireLurker particularly worrying is that the malware exploits weaknesses in Apple’s software that could, they claim, be easily be used for far more dangerous threats.
You can easily scan for the malware threat with my free app FastTasks 2 (v 1.53 or later). If you don’t see the warning as in the screenshot above or any results in the Analyser ‘Issues’ pane, you’re clean of any of the currently known files associated with WireLurker. If you do see the warning, locate the infectious files from the Analyser pane and delete (OS X will demand your Admin password to remove some of them), then restart your mac.
🙂
Xcode: wrap code in comment tags
Nov 29
Posted by philastokes
While AppleScript’s Script Editor has long had a built-in function for wrapping or unwrapping code with comment tags, for some reason this seems to be missing in Xcode.
Not to worry, nothing a bit of AppleScript and Automator can’t sort out. This will work in most text editors as well as in Xcode. Here’s what it does:
Install the Service by double-clicking on the downloaded .workflow file and clicking through the dialog boxes. When it’s installed, you can assign it whatever hotkey you want in System Preferences | Keyboard | Shortcuts.
Download Toggle Comments for Selection workflow.zip
If you want to use it for languages that have different comment tags you can adjust the code in Automator. Likewise, it would be fairly simple to have the script detect a number of different tags and respond appropriately, but here I’ve just stuck with the /* …. */ tags.
A note on usage: when uncommenting, it’s best to ensure that the selection begins at the leading forward slash and ends at the trailing forward slash (in other words that there’s no whitespace at either end of the selection). I have built in some attempt to strip leading and trailing whitespace, but an accurate selection will always be the most reliable.
Download Toggle Comments for Selection workflow.zip
Enjoy 🙂
Share this:
Like this:
Posted in AppleScript, Automator, Developer, Xcode 6
Comments Off on Xcode: wrap code in comment tags
Tags: comment, comment blocks, comment tags, comments, hotkey, keyboard, keychord, shortcuts, Xcode