Open a pile of links in browser tabs, all at once!

One of things I occasionally do at work is to grab every url for a client’s domains/sites and open them up to eyeball them and see if anything obvious needs fixing.

First I go and copy a list of all the active domains, and clean it up with a “search and replace” script. I end up with a list of url’s, one per line.

After that I copy it all and go over to the Terminal and run a nice little script which I call “tab”. My current default browser then starts sprouting tabs galore.

Here’s the script:


#!/bin/bash
pbpaste | tr "\r" "\n" | xargs -n 1 open

How does it work?

pbpaste provides the contents of the clipboard to the command line (see pbcopy to put things into the clipboard). tr translates characters, in this case from one kind of line end (or return character) to another. An issue with pbcopy from what I can tell! Then the cleaned up clipboard gets pushed to xargs which take the command -n 1 open and builds one open per line of data being fed to it. Yes, xargs is very cool. The open command will then “open the URL in the default browser”.

I am sure this can all be done in Applescript or Automator.. but typing tab and return on the command line is the fastest and simplest for me!

If you want to use the script and are not sure how to take the shell code above and turn it into an actual script.. let me know and i’ll provide instructions (gee, another blog post!).

Links
Mac OS X

Comments (0)

Permalink

How to run the same application more than once!

I spotted this trick on macosxhints.com: An easy way to run multiple instances of any program

Apple’s Developer Resources has a copy of the man page for open and explains it like this:

-n  Open a new instance of the application(s) even if one is already running.

So what can you do with it, and why?

I had no real use for it until this morning when I wanted to test the CPU load on Safari of a web site, without having to close all my windows and their tabs. So I fired up the terminal and did;


open -n /Applications/Safari.app

… and then there were two Safari icons in my Dock!

The MacOSXHints article warns that there is some danger having multiple copies of an application open, as they will all be trying to read/write to shared files like preferences.

Let me know if you have any cool uses for it!

Mac OS X

Comments (0)

Permalink

Grand Opening: Carbon Computing Ottawa!



carbon-lineup, originally uploaded by jfingas.

Standing in line waiting for the Opening Sale to start..

General

Comments Off

Permalink

Flickr

This is a test post from flickr, a fancy photo sharing thing.

General

Comments Off

Permalink

The perils of VOIP and cluelessness!

OK, so it’s really not VOIP’s fault.. here’s my clueless CSR story of the day:

My mom called to let me know that everything was fine, and that they would be offline until they come back from their home-away-from-home in Florida. What happened? Well, it turns out that when your phone is VOIP and you call Comcast (their local cableco) and tell them to disable the internet in a week, they just hear “disconnect”. The call dropped about 15 seconds later.

After a day of calling on their cell phone and trying to get the service reinstated *for just one week*, and not getting anywhere they gave up.

fun, eh?

Rant!
Tech. Support

Comments (0)

Permalink

Fingerpainting recipe..

I spotted a nice and simple recipe for fingerpaint linked off of swissmiss’s site.. but it contains food coloring, which I would prefer to avoid, seeing as my son is allergic to it.

Alternatives anyone?

General

Comments (0)

Permalink

“Introduction to Mac” Workshop coming up on January 26th

I will only quote part of the announcement regarding the Workshop Tom and I are offering next weekend… all the details are on Tom’s site: Introduction to Mac course, in Ottawa, Ontario, on January 26th, 2008.

As you can guess from the course title, we will be doing an introduction to the Mac, from the outside in!

Some of the major applications which will be covered include; Mail, Safari, Address Book, iCal, iChat, and the iLife suite of applications. There will be time at the end to address specific questions, which we expect will arise!

As Tom says:

Now that the details are (finally) worked out, I can safely announce that Dave Rostenne and I are offering our first combined course for users who are new to Macs, or have just "switched". The course will take place over at the School of the Photographic Arts: Ottawa (SPAO), and you can find details on their special events page or in this printable PDF file.

When

Saturday, January 26th, 2008 from 1:00 PM to 4:00 PM, with an additional hour afterwards (4:00 PM to 5:00 PM) for questions and answers.

The cost and how to register

The cost is a very reasonable $79, and to register, you can either call (613) 562-3824 or email ADMIN@SPAO.CA. Register soon, because seating is limited to 20 people!

We hope to see you there!

Macintosh
Mac OS X
General

Comments (0)

Permalink

AppleScript 2.0!

Thanks to df for pointing out that Apple has posted release notes for AppleScript in Leopard.We can now ask if an application is running, without AppleScript launching it to find out. ;-)Some nice additions to running AppleScript on the Command Line:

  • use # to comment out a line
  • start the script with #!/usr/bin/osascript, and make it executable, will enable it to be run in the shell
  • osadecompile is a command line script to display compiled scripts as text

Now osascript also supports additional arguments on the command line, so now you can run a script and provide strings for it to use. see the osascript man page for details, and an example. This feature was available in Tiger, I just never noticed until now!

Applescript
Mac OS X

Comments (0)

Permalink

StuffIT download

StuffIT, that became Allume, that became digital river is becoming less and less relevant on Mac OS platform. Part of the reason for that, of course, is the policy of the manufacturer, that requires signing up, buying things, etc. It’s nearly impossible to find the free StuffIT expander, for those rare moments when you need it.

In any event, here is a direct link to the StuffIT download page. I had to give out a throw-away e-mail address to get it.

Mac OS X
Software

Comments (2)

Permalink

SCIFI’s Fiction Archive is going offline! WGET your copy today!

To be honest, I did not do any research to figure out why the archive is going offline in 2 days. I took a quick look, decided there was tons of great content, and…

wget -m -np -p --include-directories=/scifiction/classics/,/scifiction/originals/ http://www.scifi.com/scifiction/archive.html

Which gave me about 13 Megabytes of files.. and since I know I don’t have time to read them now:

tar jcv www.scifi.com -f scifi.com_archive

And tossed the resulting 5.5 Mb file into *my* archive folder.

Thanks to Boing Boing for pointing it out!

Random Observations

Comments (1)

Permalink