found_drama


Spectrum analysis.


    Archive for May 2005

    #synctunes

    Submitted for scrutiny (esp. since it doesn’t appear to be working…):

    synctunesin.sh gets the latest iTunes Library info from the iTunes User account

    #!/bin/bash
    
    TUNESHARE=/Users/itunes/Music/iTunes
    AMYLIB=/Users/amy/Music/iTunes
    GUESTLIB=/Users/guest/Music/iTunes
    ROBLIB=/Users/rob/Music/iTunes
    
    if [ $USER != itunes ]; then
      if [ $TUNESHARE/iTunes\ 4\ Music\ Library -nt $AMYLIB/iTunes\ 4\ Music\ Library ]; then
        cp $TUNESHARE/iTunes\ 4\ Music\ Library $AMYLIB/iTunes\ 4\ Music\ Library
        cp $TUNESHARE/iTunes\ Music\ Library.xml $AMYLIB/iTunes\ Music\ Library.xml
      fi
      if [ $TUNESHARE/iTunes\ 4\ Music\ Library -nt $GUESTLIB/iTunes\ 4\ Music\ Library ]; then
        cp $TUNESHARE/iTunes\ 4\ Music\ Library $GUESTLIB/iTunes\ 4\ Music\ Library
        cp $TUNESHARE/iTunes\ Music\ Library.xml $GUESTLIB/iTunes\ Music\ Library.xml
      fi
      if [ $TUNESHARE/iTunes\ 4\ Music\ Library -nt $ROBLIB/iTunes\ 4\ Music\ Library ]; then
        cp $TUNESHARE/iTunes\ 4\ Music\ Library $ROBLIB/iTunes\ 4\ Music\ Library
        cp $TUNESHARE/iTunes\ Music\ Library.xml $ROBLIB/iTunes\ Music\ Library.xml
      fi
    fi
    
    exit 0
    

    synctunesout.sh takes your playcounts, updated ratings, etc. and updates them in the central iTunes User account

    #!/bin/bash
    
    TUNESHARE=/Users/itunes/Music/iTunes
    AMYLIB=/Users/amy/Music/iTunes
    GUESTLIB=/Users/guest/Music/iTunes
    ROBLIB=/Users/rob/Music/iTunes
    
    if [ $USER != itunes ]; then
      if [ $AMYLIB/iTunes\ 4\ Music\ Library -nt $TUNESHARE/iTunes\ 4\ Music\ Library ]; then
        cp $AMYLIB/iTunes\ 4\ Music\ Library $TUNESHARE/iTunes\ 4\ Music\ Library
        cp $AMYLIB/iTunes\ Music\ Library.xml $TUNESHARE/iTunes\ Music\ Library.xml
      fi
      if [ $GUESTLIB/iTunes\ 4\ Music\ Library -nt $TUNESHARE/iTunes\ 4\ Music\ Library ]; then
        cp $GUESTLIB/iTunes\ 4\ Music\ Library $TUNESHARE/iTunes\ 4\ Music\ Library
        cp $GUESTLIB/iTunes\ Music\ Library.xml $TUNESHARE/iTunes\ Music\ Library.xml
      fi
      if [ $ROBLIB/iTunes\ 4\ Music\ Library -nt $TUNESHARE/iTunes\ 4\ Music\ Library ]; then
        cp $ROBLIB/iTunes\ 4\ Music\ Library $TUNESHARE/iTunes\ 4\ Music\ Library
        cp $ROBLIB/iTunes\ Music\ Library.xml $TUNESHARE/iTunes\ Music\ Library.xml
      fi
    fi
    
    exit 0
    

    chmod to give them their “x” bits and then add as a LoginHook and a LogoutHook (respectively) via:

    $ sudo defaults write com.apple.loginwindow LoginHook /Library/Scripts/synctunesin.sh
    $ sudo defaults write com.apple.loginwindow LogoutHook /Library/Scripts/synctunesout.sh
    

    So in theory, these should run when a user logs in and logs out (respectively) effectively synchronizing the iTunes Library files. I know the scripts work because running them manually from the command line seems to sync things up. But they do not appear to be executing (or executing properly?) as Login/outHooks despite the fact that they were successfully added:

    rob@Malkovich $ sudo defaults read com.apple.loginwindow
    {
        LoginHook = "/Library/Scripts/synctunesin.sh";
        LogoutHook = "/Library/Scripts/synctunesout.sh";
    }
    

    Thoughts? Comments? Suggestions? Alternatives?


    #introducing Malkovich

    Previously alluded to (first here, and then here and here, and then finally here): enter the Malkovich:

    short version: wow.

    slightly longer version: friggin’ awesome in every respect.

    detailed version: as previously mentioned there was some confusion/oddness with the LoginHook I planned to use for iTunes Library sync’ing. But that has since been worked out. NOTE: sudo vi /etc/ttys won’t do it but sudo defaults write com.apple.loginwindow LoginHook /your/script/path/here will. Remember to check the perms on your directories, kids.


    #discrepancies

    Link time: Judge: Parents can’t teach pagan beliefs

    ‘There is a discrepancy between Ms. Jones and Mr. Jones’ lifestyle and the belief system adhered to by the parochial school. . . . Ms. Jones and Mr. Jones display little insight into the confusion these divergent belief systems will have upon (the boy) as he ages,’ the bureau said in its report.

    Divergent? You mean like “balance in nature and reverence for the earth” vs. “all enjoyment of life is clearly the work of the devil”? I’m assuming here that the “go forth and procreate” dogma somehow conflicts with “reverence for the earth”.


    #I <3 BoingBoing


    #Malkovich-Malkovich!

    Malkovich arrived this afternoon. It was so tough not to just leave work early to come home and set the thing up.

    Ahh…. But it’s so nice.

    Too bad my -LoginHook solution for the “shared Libraries” issue won’t work b/c “LoginHooks” have been deprecated in 10.4. /sigh Other fights to fight though…


    #anticipation


    suspense!
    anticipation!
    expectation!

    #books!

    Via Dystopian Ethic… (and suddendly, having flashbacks to the alternate, SMC-only meaning of “books”)

    1. Total number of books I own: Following the great purge of ’02 and then the floods of ’03 and ’04… We’re down to probably somewhere in the vicinity of 500 books ranging from Surprise, Surprise to Fundamental Neuroscience.
    2. Last book I bought: If memory serves correctly… Villa Incognito
    3. Last book(s) I read: my third reading of Infinite Jest was completed two nights ago; I didn’t “finish” but “got finished with” Programming PHP a little while back in favor of non-paper technical docs on other topics.
    4. 5 books that mean a lot to me:
      • Infinite Jest by David Foster Wallace
      • Neuromancer by William Gibson
      • Snow Crash by Neal Stephenson
      • The Catcher In The Rye by J.D. Salinger
      • Grendel by John Gardner
    5. Tag 5 people and ask them to fill this out in their LJs blogs:

    #on launchers and other nerdy things

    Terribly interesting finding in my main console.log file today…

    May 24 08:38:07 KetelOne /Applications/Quicksilver.app/
      Contents/MacOS/Quicksilver: LaunchApplication
      (/Applications/Utilities/Terminal.app)
    May 24 08:38:10 KetelOne /Applications/Quicksilver.app/
      Contents/MacOS/Quicksilver: LaunchApplication
      (/Applications/Firefox.app)
    May 24 08:38:14 KetelOne /Applications/Quicksilver.app/
      Contents/MacOS/Quicksilver: LaunchApplication
      (/Applications/Mail.app)
    May 24 08:38:20 KetelOne /Applications/Quicksilver.app/
      Contents/MacOS/Quicksilver: LaunchApplication
      (/Applications/iCal.app)
    May 24 08:38:43 KetelOne /Applications/Quicksilver.app/
      Contents/MacOS/Quicksilver: LaunchApplication
      (/Applications/Microsoft Office X/Microsoft Excel)
    May 24 08:38:46 KetelOne /Applications/Microsoft Office X/
      Microsoft Excel: *** Warning: ATSUMeasureText has been
      deprecated.  Use ATSUGetUnjustifiedBounds instead. ***
    May 24 08:39:14 KetelOne /Applications/Quicksilver.app/
      Contents/MacOS/Quicksilver: LaunchApplication
      (/Users/rob/Applications/VoodooPad Lite.app)
    

    Now, I know that these apps launch in this order from an AppleScript that I run when I plug in at work. The interesting thing (to me) is that the console is suggesting that these apps were launched by Quicksilver and not by the AppleScript that queues them or even Script Editor.app. So the mystery becomes: How is Quicksilver owning these launches? Especially since Quick silver isn’t even invoked in the script… Just plain ol’:

    tell application “Terminal”

      activate

      set the bounds of window
    1 to {20, 20, 820, 620}

    end tell

    tell application “Firefox”

      activate

    end tell

    And so on…


    #suspense


    the
    suspense
    is
    killing
    me

    #THE MOVIE

    I’ve now had 3 people ask me: “Have you seen The Movie yet?” …as if there were only one. And the funny part is, I know exactly what movie they’re talking about.




    Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.