blog advertising is good for you


blog advertising is good for you
User login

CUPS is the name of the service that handles printing in Mac OS X 10.3 to 10.5. It has a lot of features that aren’t really pushed in the GUI in Mac OS X, but users are able to get at those features by using the special administrative interface at http://localhost:631/.

One of those features is classes. A class, in this context, is a group of printers that can be made to look as if it were one printer. This is great in lab settings where you have half a dozen printers of the same type as you can add them all to a class on a print server and have everyone print to that queue. Then whichever printer is free (or round-robin) will print the job. There's more »

I needed to change many iBooks from having a Preferred Network (and wanting to keep looking for that network) to automatically joining any open network and not giving a preference to that certain network.

I found that the two preference files involved were:

  • /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist
  • /Library/Preferences/SystemConfiguration/preferences.plist

I also found that the computer name is kept in preferences.plist, so copying these two files out to all the iBooks would have resulted in a same-name-game fiasco. Soooo, my solution was to:

  1. Copy /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist out to all the iBooks using Apple Remote Desktop.
  2. Issue the following UNIX command as root also using Apple Remote Desktop: sed -i.backup -e ‘s/Ranked/Automatic/’ /Library/Preferences/SystemConfiguration/preferences.plist

This command will search through the preferences.plist file for the word Ranked and replace it with the word Automatic.

As others have noted, there’s nothing all that new about Time Machine other than its UI. UNIX admins have been doing similar incremental backups for ages immemorial. Well, OS X is a UNIX, isn’t it? So it should follow that we can get the same bang-for-buck in Tiger (and possibly prior versions, too). For this, rsync and cpio are our friends today. Adam Knight did most of the footwork here; I just hacked it up into OS X-compatibility. There's more »

We may not like it, but OS X malware is on the rise. Even if you prefer the lalala-I’m-not-listening approach to security, you may want to do the decent thing and not forward such nasties from your Windows-using colleagues. Here’s how to set things up.

 

  1. Install clamav (the pre-eminent open source virus scanner).

    The easiest way to do this is download and install ClamXav. This includes a nice OS X front end for clamav and an on-access folder-watching utility.

  2.   There's more »

I’d pretend that I have a more productive use for these ideas, but I don’t. I wanted to nab all of Order of the Stick and xkcd because I hate clicking through pages and then scrolling down for long images only to scroll back up for the next one. I figured that if I had them all, then I could just open up a batch, set Preview’s window once, and then thumb through them offline. To balance the karma from such a leech event I’ll just get some things from each comic’s shop (regexp/science) and the universe will still be happy and sunny and annoying and stuff.

I started with OoTS and went to the first comic. Looking at the URL for the comic image itself, I saw that it was a sequential number, one for each comic. Well, that’s remarkably easy as I then used curl to download them with a move like: curl -O http://that.com/ic/images/comic[000-999].jpg. That tells curl to grab a thousand images in sequence and requires no actual thought.

However, the last hundred or so didn’t come through like that, so I went to the page and pondered why. When I checked the URL of the image to see if it had moved, I realized that someone was on to people like me. It’s in the same place, but it’s been named with a random hash for a filename. Good job, you just made this a challenge. There's more »

I have waaaay too many chat buddies to leave offline contacts visible in my Adium buddylist, but I tend to IM a few of my Jabber buddies frequently even when they’re offline. In Adium, you can create new chat, select the service, and start typing in the UID of the contact, but that’s a small chore.

The dictionary for Adium’s AppleScript support is sparse and confusing, though I’m sure it makes perfect sense for seasoned AppleScript vets. I had to trowel around on Adium’s Trac site to figure it out. Documented here, for you pleasure, is how to create a new chat via AppleScript. There's more »

Hi, is there any way for my laptop to start up different sets of applications on login based on whether it’s on power adapter or battery? Short of having two different accounts I mean.

Thanks.

Read the answer...

What syntax would I use to change the color depth of the display/monitor either in an Applescript on OS 10.4 OR via command line (defaults write maybe) ?

Read the answer...

You no longer need Windows. Now, it can all be done on your Mac. Everything from fetching the files from the TiVo to the decrypt and playback can be accomplished on the Mac side. This all due to some great work by the guys on the TiVo Decode and Galleon projects. Let’s get started.

A short road map of where we’re going:

  1. Install Galleon.
  2. Configure the ToGo feature of Galleon to automatically download selected shows from the TiVo into a download folder.
  3. Create a script to decode any completed downloads and launch it with launchd when a file is in the folder.
  4. Optionally create another script that uses VLC to transcode those decoded files.

This article discusses a method to automate the process of getting the files off the TiVo and into Front Row/iPod format. If you just want to convert a single file then just run tivodecode on the TiVo file and you’ll have an MPEG-2 file that VLC can play. If, however, you want to make a media center that does everything for you and keeps anything from one show to everything the TiVo records, then you should read on.

Note the updated scripts at the end of the article that resolve some issues with catching files in their varying states. These appear to get it right almost all of the time now. There's more »

cover of Hacking the TiVo, 2nd EditionHacking the TiVo, 2nd Edition
author: William von Hagen
asin: 1592004814
cover of Philips HDR612 TiVo 60 Hour Digital Video RecorderPhilips HDR612 TiVo 60 Hour Digital Video Recorder
asin: B00004UE2L
cover of TiVo Wireless G USB Network Adapter for Series2 DVR (AG0100)TiVo Wireless G USB Network Adapter for Series2 DVR (AG0100)
asin: B000ER5G6C

A Simple Backup Script

Here’s a question. I’d like to write a simple bash script that allows me to take a list of files that are in several directories and perform a repetitive action on each one.

For instance, let’s say iTunes is organizing my music by Artist and then Album into folders in ~/Music. I want to find, say, all of the purchased videos with .m4v extensions, or perhaps something in the metadata. So I can run

mdfind -onlyin ~/Music m4v > videos.txt

that generates a list of these files, along with their complete directory.

Now let’s say I want to copy all of these files to a backup drive, so for each video, I want to run:

cp /Users/james/Music/Artist/Album/video1.m4v /Volumes/backup/purchasedvideos/

but I want to do that with every single video on the list. How do I utilize the stdin of each line of the videos.txt file to cp in order to automate this sort of copy process?

Thanks in advance.

Read the answer...