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

Search sites via Google and Terminal Internet
Here is a script that allows you to Google your query by typing it into Terminal:

read F1
F=`echo $F1 | sed s/\ /+/g`

open "$F"
Copy and paste that into a new blank document in vi, pico, emacs, etc., and save it somewhere on your user's path. Then make it executable (chmod a+x googleit) and you can run it by typing googleit (or whatever you called it), pressing Return, and then entering your search term(s). You can't do a phrase search with this one -- try something quoted like "steve jobs and bill gates" and it will fail -- but I am hoping that someone here can come up with a solution.

There is more. I usually find myself googling something inside a website. The websites that have the answer are mostly limited (at least in my case), and that makes it a drag to type the same long web address into Google's search field every time I want to search for something. So I came up with a solution...
read more (162 words)   Post a comment  •  Comments (14)  
  • Currently 2.13 / 5
  You rated: 4 / 5 (8 votes cast)
[12,713 views]  View Printable Version
Speed up DNS lookups Internet
This hint isn't specific to Mac OS X, but I find it so helpful I wanted to share it. You can speed up DNS response for look-ups by specifying OpenDNS' servers in System Preferences » Network » Configure » TCP/IP. The optional DNS Servers field is probably empty, so to switch to OpenDNS' servers, you enter their IP addresseses into that field:

You can also make this change in the setup mode of some routers and cable modems, if you wish to convert a local area network all at once, rather than making the change on each machine individually.

The response time for DNS lookups is usually faster even for web browsing, but where OpenDNS really helps is when you are processing web server log files to turn IP addresses into names. I use DNSTran on my log files before processing them with Summary, and I'll bet it takes about a tenth of the time when using OpenDNS compared to using whatever my ISP offers as a default. For me, this is the difference between 30 to 40 minutes of waiting for lookups to complete, versus waiting only a few minutes.

The only thing you have to be aware of is that if you dig an invalid address in, the results will appear to show that the main DNS server for your invalid address belongs to OpenDNS, which is almost certainly not the case. If this is a problem, though, you can set up different locations in System Preferences » Network, allowing quick and easy switching among default DNS servers, OpenDNS servers, and any other servers you may use.
  Post a comment  •  Comments (34)  
  • Currently 2.45 / 5
  You rated: 3 / 5 (11 votes cast)
[45,427 views]  View Printable Version
Search for text in clipping files on Google via Safari Internet
I'm not sure how useful this hint is, but I'll pass it along anyway. If you drag a text clipping file onto the Safari icon in the Dock, Safari will pass the contents through to the Google search bar and return the results of a google search.

Possible uses for this could be:
  • Finding the original website that the text clipping came from
  • Keeping saved search queries for easy access in the future (though I sort of thought that this was the whole point of bookmarks)
  Post a comment  •  Comments (2)  
  • Currently 2.63 / 5
  You rated: 5 / 5 (8 votes cast)
[6,175 views]  View Printable Version
Open Wikipedia Topic from Script Menu Internet
This short Applescript prompts you for a Wikipedia topic and opens the resulting page in Safari. There is a nice Wikipedia Dashboard widget, but sometimes you might want full browser access. You can save the script in the Script Menu (~/Library/Scripts/), so it's accessible no matter what application you're in. Wikipedia is smart enough to convert spaces to underscores in the URL, so it's no problem if your topic has spaces in it.
-- Wiki-Lookup
-- Quickly look up an item in Wikipedia

on run
	set Entry to display dialog "Lookup a Wikipedia entry:" default answer ""
	set textEntry to text returned of Entry
	set theURL to "" & textEntry
	tell application "Safari"
		make new document with properties {URL:theURL}
	end tell
end run
kirkmc adds: If you don't see the AppleScript menu in your menu bar, open AppleScript Utility (located in /Applications/AppleScript), and check Show Script Menu in menu bar. If you use a different browser, you can change the "Safari" in the script to the name of your browser.
  Post a comment  •  Comments (11)  
  • Currently 2.25 / 5
  You rated: 1 / 5 (8 votes cast)
[8,911 views]  View Printable Version
An AppleScript to automate HTML link construction Internet
I often want to include an HTML link to a page in stuff I put on the web, so I developed the following AppleScript. It takes a URL off of the clipboard and auto-builds the link HTML and then places that HTML on the clipboard. To use, first put the URL on the clipboard (select the URL and copy it), then run the script. Finally, paste the link HTML into your blog, email, etc. Here's the AppleScript:
set the_url to the clipboard
set the_text to "<a href="" & the_url 
 & ""target=_blank>here</a>"
set the clipboard to the_text
Save this as an AppleScript application, and then put it wherever it's easiest for you to run -- I put it into my AppleScript utility menu. When you paste the link HTML into a document, the link will look like this: here. If you want to control the link text to say something other than "here," then read on for an alternative script.
read more (163 words)   Post a comment  •  Comments (6)  
  • Currently 1.88 / 5
  You rated: 3 / 5 (8 votes cast)
[7,698 views]  View Printable Version
Prevent a potential WPF/e - Silverlight conflict Internet
Silverlight is the new name of something that came up a few months ago (in beta as well) under the name WPF/e.

The installer for Silverlight doesn't look for a previous install under the old WPFe name, and installs itself in addition to the old plug-in. Bad, bad karma. For people who have installed the old beta, I would suggest deleting /Library » Internet Plug-Ins » WPFe.plugin. if they want to install Silverlight. There should be a WPFe receipt as well, but for some reason, I couldn't find it on my Mac.
  Post a comment  •  Comments (2)  
  • Currently 1.63 / 5
  You rated: 3 / 5 (8 votes cast)
[6,840 views]  View Printable Version
Convert Flash video to other formats via an online tool Internet
Many YouTube to iPod/Quicktime format converters exist, but most either cost money or are impractical. As an alternative, is a free, online, fast video conversion tool. Export YouTube videos to a variety of formats, including iPod, QuickTime, and AVI. A frame of a logo is placed at the end of the movie, but other than that, there is no video alteration.

[robg adds: I tried this with a 2:48 video from YouTube, and it worked -- just don't try to use the Save button on the site. I first tried to click Save, and got a "400" error. Then I noticed that my browser (Camino, but Safari does the same) had auto-downloaded the file. The conversion isn't the quickest, particularly because the site can't tell your browser to maximize CPU usage, so things happen based on the browser's priority (open mouth insert foot!). On my Mac Pro, it took about six minutes to convert that 2:48 clip. The end result, though, seems to be of very good quality (obviously tied to the quality of the source).]
  Post a comment  •  Comments (8)  
  • Currently 1.29 / 5
  You rated: 3 / 5 (7 votes cast)
[41,177 views]  View Printable Version
Use the keyboard to select web page drop-down menus Internet
One feature I like from Internet Explorer for Windows is that web forms are fully-accessable via the keyboard. For a long time, Safari and other Mac web browsers didn't let you select drop-down menus while navigating through a form by pressing the Tab key, so we had to resort to using the mouse for those, which I found fairly annoying. I'm not sure when this changed, but I've been keyboard-navigating through web forms in Safari for months now!

If you Tab through a web form (such as the one on the hint submission page) with Safari or another WebKit-enabled browser, and then hit the down-arrow key when the drop-down menu highlights, you can select all the options, and even jump to a selection by typing out the first few letters of what you want!

kirkmc adds: I couldn't find anything in the archives about this, though I have a feeling it has probably been hinted before. Note that you can also use the spacebar to select drop-down menus; press the spacebar to display the menu, use the up- or down-arrow keys to move around, then press Enter to confirm your selection.
  Post a comment  •  Comments (11)  
  • Currently 1.56 / 5
  You rated: 2 / 5 (9 votes cast)
[14,409 views]  View Printable Version
Easily place Address Book email addresses in web forms Internet
So I was creating a new Flickr group and had a ton of people to invite via email -- how to best export a large number of email addresses from 10.4's Address Book? I couldn't find a script, so I thought about using the freeware AddressWeb as found in the comments to this hint.

On a whim, though, I tried entering some of those names in, selecting all, copying, then pasting into Firefox's input field on the Flickr page. Voila, email addresses, nicely formatted with commas and everything. You can even drag and drop the completed name from Mail into a text entry field and have it populate the email address.
  Post a comment  •  Comments (0)  
  • Currently 2.22 / 5
  You rated: 5 / 5 (9 votes cast)
[7,502 views]  View Printable Version
An AppleScript to display Technorati rank in Skype Internet
The following AppleScript does one thing: It queries Technorati for my site's ranking, and updates my Skype mood message with a little ditty about my ranking: Technorati Ranking: 2426.

Here's the script; you'll need a Technorati API key and the SatImage XML Parser to make it work:
set trati_apikey to "xxxxxxxxxxxxxxxxxxxxxxxx"
set myblog to ""
set trati_URL to ""
set trati_xml to do shell script "curl -G -d url=" & myblog & 
 " -d key=" & trati_apikey & " " & trati_URL

set trati_xml to XMLOpen trati_xml
set the_root to XMLRoot trati_xml
set tapi to XMLChild the_root index 1
set doc to XMLChild tapi index 1
set weblog to XMLChild doc index 2
set rank to XMLChild weblog index 8
set rank to XMLGetText rank

tell application "Skype"
  send command 
   "SET PROFILE MOOD_TEXT Technorati Rank: " & 
   rank script name "skypetechnorati"
end tell
While this is probably pointless for most people, it does demonstrate Skype scripting as well as web application API calls. You can read the full post on my blog if you'd like a bit more detail (and a screenshot).

[robg adds: I haven't tested this one.]
  Post a comment  •  Comments (1)  
  • Currently 2.11 / 5
  You rated: 5 / 5 (9 votes cast)
[4,869 views]  View Printable Version