Fast translation with Google Translator

March 7, 2016

via https://medium.com/@mrdoro/fast-translation-with-google-translator-and-mac-osx-817e32233b7a


Nice article about how to create a service to automatically translate selected text from any application. I use this all the time, I have a “German-to-English” service bound to Command-Alt-Ctrl-Shift-E, so I can just select text off the screen, press the shortcut, and a window with the translation will pop up. Very handy.

Clicking on the MacBook Pro is entirely artificial

October 13, 2015

via http://sixcolors.com/post/2015/10/apple-magic-trackpad-2-review/

This is probably old news for most, but it still blew my mind: only now I realized that the clicking feeling and sound on my MacBook Pro’s trackpad is artificially generated. I did the experiment of turning on “Silent clicking” and turning off “Force click and haptic feedback” on the trackpad preferences panel and, indeed, the clicking is gone. Wow (/ht @jsnell)

To aid in the process, the Magic Trackpad apparently even generates its own artificial clicking noise (as the Force Touch trackpads in the MacBook and MacBook Pro do). If you think that’s weird, you can enable Silent Clicking in the Trackpad system preferences pane, and the artificial sound will shut off. (There’s still a sound when you click, though, thanks to the vibration—but it’s much subtler.)

As on the MacBook, it’s kind of hard to believe that the Magic Trackpad 2 isn’t actually clicking when you push down. The glass does flex with the pressure a little bit, but that clicking feeling is entirely artificial.

Find all single-note tags in Evernote

January 14, 2015
I’ve been working on cleaning up my Evernote, and noticed that I have a lot of tags assigned to a single note. I had successfully used Veritrope’s excellent Evernote empty tag remover applescript, so I made some small changes to write the attached script, which will find all single-note tags in your Evernote and list them in a new note, including links to each note. This makes it much easier to go through them and see which of those tags could be removed.

Just download the script, open it in Script Editor and run it.

Tip of the hat to Justin for his excellent collection of scripts at Veritrope!

(*
Evernote -- Find all single-note tags
January 13, 2015, Diego Zamboni
http://zzamboni.postach.io/find-all-single-note-tags-in-evernote
Based on:
http://veritrope.com
Evernote -- Empty Tag Remover
http://veritrope.com/code/evernote-empty-tag-remover
*)
set output to {}
tell application "Evernote"
try
set theTags to every tag
repeat with theTag in theTags
set theNotes to {}
set theName to "\"" & name of theTag & "\""
set theNotes to (find notes "tag:" & theName)
if (count of theNotes) is 1 then
copy ((name of theTag) & ": " & "<a href='" & (note link of (first item of theNotes)) & "'>" & (title of (first item of theNotes)) & "</a>") to the end of output
end if
end repeat
end try
set sortedTags to my simple_sort(output)
set oldDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to "<br>"
set articleList to sortedTags as text
set AppleScript's text item delimiters to oldDelim
set o to create note with html articleList title "Single-note tags"
open note window with o
end tell
--SORT SUBROUTINE
on simple_sort(my_list)
set the index_list to {}
set the sorted_list to {}
repeat (the number of items in my_list) times
set the low_item to ""
repeat with i from 1 to (number of items in my_list)
if i is not in the index_list then
set this_item to item i of my_list as text
if the low_item is "" then
set the low_item to this_item
set the low_item_index to i
else if this_item comes before the low_item then
set the low_item to this_item
set the low_item_index to i
end if
end if
end repeat
set the end of sorted_list to the low_item
set the end of the index_list to the low_item_index
end repeat
return the sorted_list
end simple_sort

How to solve truncated docker output in Mac OS X using boot2docker

May 12, 2014

If you are using docker on Mac OS X using boot2docker (http://docs.docker.io/installation/mac/), you may see truncated output from docker run, and also may have noticed that docker attach does not work properly, producing only some output and then exiting. This bug is documented here: https://github.com/boot2docker/boot2docker/issues/150, where I also found the following workaround. Documenting it here in case anyone finds it useful:

Instead of using the default value of DOCKER_HOST provided by boot2docker up, establish the docker connection through an ssh tunnel:

How to stop com.apple.dock.extra from "using significant energy"

March 4, 2014
I’d been having for some time a problem with `com.apple.dock.extra` appearing in the “Apps using significant energy” section of the battery menu. I just learned the solution (from http://forums.macrumors.com/showthread.php?t=1651662): remove BusyCal 1.6 (I upgraded to BusyCal 2, but left the old version around in case I had to go back to it). After removing it and restarting the Dock, the problem stopped.

From the same thread, it seems the problem was caused by BusyCal’s “animate transitions” preference. I didn’t try that, but if you are still using BusyCal 1.6 and have this problem, it’s worth trying.

Changing "message:" protocol handler from Sparrow back to Mail.app

January 25, 2012
After using Sparrow for a while, I have decided to switch back to Mail.app. However, even after setting my default email client to Mail.app, all my message: links (for example, from messages dragged from Mail.app into Things) were opening in Sparrow.

After some experimentation, I figured out what happened: I switched the default email client from Sparrow to Mail using Mail's preference panel:

Pastedgraphic-1

Apparently this switches the application for the mailto: protocol, but not for message:, nor for .eml files. The solution was to use Sparrow's preference panel to set it again as the default email client, and then disable it. Then Sparrow correctly sets all the protocol handlers back to their default values.

image from Changing "message:" protocol handler from Sparrow back to Mail.app

Installing cfengine on Mac OS X

August 5, 2011

Cfengine (tested 3.2.0) installs easily on OS X (tested 10.7), given that it's Unix. One problem I encountered was that it does not compile with the bundled version of Berkeley DB (it recognizes it during configure, but produces compilation errors). The solution is to use some other DB engine. I chose Tokyo Cabinet. Using homebrew, the process is simple

brew install tokyo-cabinet

After this, configure --with-tokyocabinet, and then compile and install as usual.

CopperExport development paused

December 11, 2009
I want to post a short update aimed at users of my iPhoto plugin CopperExport. I have received multiple reports of it failing in recent updates of Snow Leopard, and I have also verified personally that it does not work properly in iPhoto'09.

Unfortunately, since the big move, I find myself without easy access to a Mac for development (I had a Mac at my previous job, and I use Windows at my new job), which pretty much makes fixing these bugs impossible. Until I get a new machine, I will not be able to provide updates to CopperExport. Of course, if any developers out there want to make the appropriate fixes, I will happily accept patches that you submit, and produce a new release myself.