battis.net and I'm all out of bubble gum…

So many of these entries are really just an attempt to make sure that the next time I go searching for an answer to some question, by gum there will be a search result. That is: I write up things that I couldn’t find an easy answer to, so that someone else reaps the benefit of my suffering.

But, sometimes, it’s just about admitting that I’m dumb.

Case in point: I’ve been grousing on Twitter about a number of things in the past week, one of which was that, for much of the fall, many of my Google calendars have been showing up in iCal doubled. Every event shows up twice. Sometimes more than that, when Google has a hiccup. And birthdays from my contacts have shown up as many as 34 times — no joke: I counted. But the core problem has been that I’ve been seeing many of my Google calendars twice in iCal. It makes me feel busy, but otherwise it serves no purpose.

And then it hit me this evening, as I was looking at the list of calendars in iCal: with the launch of Mountain Lion, Apple revised how it handled Mail, Contacts & Calendars — so much so, in fact, that they created a separate prefpane for it. That connects to iCal, Mail and the Address Book pretty transparently. Before that upgrade, to see secondary Google calendars (the ones other than your primary calendar — a distinction about which I have some more grousing to do at a later date), you had to enable calendar delegates in the Accounts section of the iCal preferences. It was messy, and ugly (you had both the delegate and the calendar nested in the delegate… for each and every calendar). But it worked.

I never turned off the delegates when Apple upgraded to Mail, Contacts & Calendars. So I was seeing both the delegate calendar and the calendar associated with my Google account in Mail, Contacts & Calendars.

For dumb.

I just turned off delegates and everything got better. Except maybe those duplicated birthdays… we’ll see what happens with them.

December 9th, 2012

Posted In: How To

Tags: , , , , ,

I’m about to embark on a group video project in my New Media class. To that end, it’s a hassle when the video (and script!) exist only in the account of one of the group members. I saw one suggestion for how to store the iMovie events and projects on an external drive, which seemed deeply convoluted and, well… a hassle. I’m not interested in purchasing or setting up external drives, or in going through that rigamarole to set it up.

So, it occurred to me that /Users/Shared/ is a pretty fine place to store shared files. And that the modern Mac OS X seems to honor symlinks pretty regularly (something I use all the time to sync my life across machines using dropbox — symlinking whole directories to sync preferences, settings and documents that the developers haven’t — yet — moved to the cloud.)

It seems to work for iMovie as well. Here’s how I did it (stay tuned to see if it blows up on my students!):

  1. Trash the iMovie Events folder in the user’s Movies folder. (This assumes that this is, essentially, a clean install of iMovie — no previous events or projects to worry about. That’s my situation).
  2. Create a new iMovie Events folder in /Users/Shared/ (note that it is created there, not moved or copied there, so that it will inherit permissions from the Shared directory).
  3. Set the permissions on iMovie Events to let everyone read and write. I like the terminal for this:

    chmod -R a+rw /Users/Shared/iMovie\ Events
  4. In the terminal, create the symlink:

    ln -s /Users/Shared/iMovie\ Events ~/Movies/iMovie\ Events

    (Note that the space in “iMovie Events” needs to be escaped with a backslash!)

  5. In iMovie, create new projects on the hard drive (probably called Macintosh HD), rather than the user’s home folder. This will put the projects in /User/Shared/ (I didn’t know that until this experiment — cool!)

In my limited testing, this seems to work transparently. The biggest caveat is the permissions change. When creating events, iMovie seems to strip the write permissions off of the inherited permissions for the iMovie Events folder (but other users can still read and execute, which should be fine). Similarly, it’s possible that other users can only read (but not edit) the shared project.

We shall see.

October 31st, 2012

Posted In: How To

Tags: , , ,

A few days ago (well, maybe a couple weeks ago), I was chatting with one of my colleagues about how I go about testing out new plugins and themes for WordPress µ before loading them on our school blog server. It seems like documenting my process might be generally helpful, so…

To start with, I decided (after ten years of mucking out Apache config files and PHP extensions and custom MySQL installs — thank you so, so much Marc Liyange for your timely and helpful installers!), that I was a grown-up and could spend $60 on a tool that makes my life easier: I run MAMP Pro on my MacBook. This means that I have a generic Apache/PHP/MySQL stack that supports commonly-used PHP extensions, Apache configurations, etc. I have redirected the document root of my install to my regular user’s Sites directory in OS X (~/Sites) so that I have ready access to the backend files of for my test installs. The net result: WordPress’ famous “Five Minute Install” is now true of almost any LAMP-based web application — I had a five-minute install of Drupal, Moodle, Joomla… you name it.

I’ve also settled into using Coda ($99) to edit HTML/PHP source code, since I particularly like the built-in terminal and publishing management features.

With WordPress µ installed (which, I guess, is now calling itself WPMU or WordPress MU or even WordPress 3 in betas), I now do the following:

  • I install create a new blog for each new theme or plugin that I want to test out. I follow a pretty intuitive naming scheme: the URL for the blog is the URL for the plugin or theme, and the name of the blog is the name of the plugin or theme (so WordPress Hashcash is at …/wp-hashcash and named WordPress Hashcash).
  • As I create each new blog, I create a new user to be that blog’s administrator. I almost never use this login, but it means that I have one user who is matched to each blog. In doing this, I make heavy use of Gmail’s + modifiers, so new user emails look like mygmailaddress+talyn+wpmu+blogurl@gmail.com — this lets me catch and filter relevant emails easily on the other end. (I developed this system when I was testing plugins that sent email notifications). For the curious, Talyn is the name of my laptop (so I know which server is sending me email) and WPMU is the keyword to distinguish these emails from, say, Drupal notifications.
  • I also have six generic users that I add to most (not all — I add them as needed) blogs, each with their own standard privileges:
    • Anna “Annie” Administrator
    • Edward “Eddie” Editor
    • Allison “Allie” Author
    • Christine “Chrissy” Contributor
    • Samuel “Sammy” Subscriber
    • Nathan “Nate” No Privileges

    I actually included nicknames so that I could control for how different themes displayed usernames (since I’m thinking about FERPA and how it may apply to our students on our school blogserver).

  • I have one blog on which I never activate themes or plugins, which I lyrically call “Is this blog in the blast radius?” This is based on my experience installing Digress.it on WordPress µ at the start of the year (it hosed every blog on the server, rather than just the one where it was activated). I check this before I deem any test complete.
  • One tricky thing that I did was that I set up MAMP to run Apache and MySQL as my local user account on my MacBook, and I have set permissions on my Sites directory so that my local user has all privileges, as does the www group, and other users have read/execute privileges (chown -R seth ~/Sites; chgrp -R www ~/Sites; chmod -R 775 ~/Sites). This means that I usually don’t run into problems with web apps that want to move or create files. This is also, of course, totally insecure. Que sera, sera.
  • I have an extra blog set up on my WordPress µ install that runs Feed WordPress, and it republishes the feeds for all of the other blogs on the server tagged Note. This means that I can post something tagged Note to any blog that I’m working on and then have all my notes together in one place. Adding the subscriptions to the Feed WordPress blog is a manual step, but not prohibitively difficult. And it really does mean that I have one place for all of my notes on how things went (or didn’t went) in my WordPress µ testing. I have the feeds categorized as Plugins, Themes, Configuration and Hacks, since those are generally what I’m testing (and mostly Plugins, at that).
  • One hitch in my system is that I have opted to keep my system entirely up-to-date (I’m running WordPress µ 2.9.2 with the most recent versions of all my plugins), while our school blog server is still at 2.8.4a. Generally speaking, this hasn’t been much of a problem, but when I’m particularly concerned, I will sometimes check things out on a lingering 2.8.4a install before loading it.

May 18th, 2010

Posted In: How To

Tags: , , , , , , , , , ,

In preparation for a class that I’ll be visiting on Monday morning, and because I have found myself explaining these things a bunch of times this year, I have put together a quick series of screencasts that give an introduction to basic video editing in iMovie. I do this not because I think that my students can learn to work in iMovie by following me stuttering and mumbling through a screencast, but because having a visual guide to refer back to after class is helpful.

A quick link to this (and anything else I may have to say about iMovie ’09) is: http://battis.net/link/imovie09

You may also be interested in more specific tutorials, and Apple has a bunch posted online. (And you can search for more on YouTube).

The basic sequence of these videos is (and here I’ll link directly to the original Screencast-O-Matic videos, which are slightly higher quality than the YouTube playlist above):

  1. 5 Minute Introduction to iMovie ’09 – This is a lightning fast orientation to very basic video editing in iMovie ’09.
  2. Using Still Images in iMovie ’09 – Importing and editing still images instead of video clips in iMovie ’09.
  3. Adding a Video Transition in iMovie ’09 – How to add transitions between video clips to make our project look more professional.
  4. Adding Titles to a Video in iMovie ’09 – How to add explanatory text (a.k.a. titles) to a video in iMovie ’09.
  5. Adding Audio Track(s) to a Video in iMovie ’09 – How to add music, effect and voiceover soundtracks to a video in iMovie ’09.
  6. Sharing Your iMovie ’09 Masterpiece with Other People – A brief rant about how to export your iMovie ’09 project as a video file that other people can watch.

February 6th, 2010

Posted In: Educational Technology, How To

Tags: , , , , , ,


This post is part of a series that are components of my “Expert Plan” at my school, looking to create a shared resource for my colleagues as the school moves towards greater adoption of laptops and technology in our pedagogy.

This AppleScript application converts any word processing files that Pages can open into PDFs. This application will only work on Macs.

Use

To use this application, drag a icon(s) of a file or group of files on to the icon for the application. When asked, pick which folder you would like to save the PDFs into. As the application runs, if Pages cannnot open a particular file, you will see a message warning you of this. When the application completes, it will display a list of all the files that could not be converted (or simply quit if all of the files were converted).

Install

To install this application, click the link below to download it as a ZIP archive. Double-click the “Convert Word Processing Files to PDFs.zip” icon to expand the ZIP archive and drag the application icon to where you want to use it.

Download

November 22nd, 2009

Posted In: "Expert Plan", Educational Technology, How To, Useful Tools

Tags: , , , , , , , , ,

So, I’ve spent the last few days wrestling with a curriculum unit that an outside consultant built. In PowerPoint. On Windows. And which we have been trying to set up in such a way that we can share the interactive document with students. Who are using Macs. And, perhaps, without asking each student to download a ~200MB file to use it.

I have learned and grown much in the process. And have discovered that Microsoft PowerPoint 2008 does an execrable job of exporting PowerPoints as web pages (it does an execrable job of doing a lot of other things too, but we can talk about that at another time). Here are the key fixes that I made to the exported web page and supporting files so that the presentation would fundamentally work (all of this was done using regular expressions in TextMate):

  1. I stripped out all of the fancy Javascript calls that PowerPoint inserted as links to navigate from one slide to another. It turns out that a simple HREF to the actual page’s HTML file works (and the JavaScript Does Not.)
    Find:

    (href=")[^"]*(slide\d{4,4}.htm)[^"]*(")

    Replace with:

    $1$2$3
  2. The export to web page takes all of the already URL-encoded links in the PowerPoint and reencodes them, rendering them useless. I stripped off the second encoding.
    Find:

    (%)25([a-fA-F0-9]{2,2})

    Replace with:

    $1$2
  3. Finally, because the links were built in Windows and then URL-encoded, all of the Windows-style paths needed to be turned into POSIX paths for use on the web.
    Find:

    %5[cC]

    Replace with:

    /

At this point, in an average PowerPoint, most of the damage has been fixed and things more or less work. However, the curriculum unit that we were working with also linked to external Word documents (hence some of the Windows-style path issues above). This meant I had a few more fixes along the way that are worthy of note:

  1. I replaced the links to Word documents with links to the corresponding PDF files (and script I used generated PDF files with .doc.pdf extensions and I didn’t bother to fix that).
    Find:

    (href="[^"]*docx?)(")

    Replace with:

    $1.pdf$2
  2. These links to external documents open in the same frame as the slideshow. Which defeats the purpose of the slideshow being a navigational tool. So I redirected all of the new PDF links to a new window in the browser. As the hyperlinks are broken across two lines in the HTML source code, this took two steps.
    1. Find (changing {{name of Links & Sources folder}} to the, well, actual name of the Links & Sources folder):
      (href="((http://)|({{name of Links & Sources folder}}))[^"]*")\n

      Replace with:

      $1
    2. Find (modifying as noted above):
      (href="((http://)|({{name of Links & Sources folder}}))[^"]*"\starget=")_top(")

      Replace with:

      $1_blank$5

September 24th, 2009

Posted In: Educational Technology, How To

Tags: , , , , , , , , , , ,

Having just spent some time fiddling with Synergy on OS X, it seems that there aren’t any current instructions on how to make Synergy start automatically on OS X Leopard (and starting it manually is kind of a hassle). My approach is based on Jan Varwig’s instructions, which needed yet more modification for my purposes. Having configured synergy.conf (nota bene: Synergy treats hostnames as case-sensitive, so read the results of hostname carefully!), I set the server and client machines to automatically start their Synergy processes on login.

This requires creating a Launch Agent on each machine (the server and the clients) to start the processes. I use Lingon, mostly because it validates my XML and lets me use the GUI, sometimes (this, by the way, was a time when the GUI failed me — it tended to trim off parameters, be forewarned and use the Expert view).

On the server, I created a new My Agent thus:

 
 
 
 
    Label
    net.sourceforge.synergy2.server
    OnDemand
 
    ProgramArguments
 
        /path/to/synergys
        --no-daemon
        --no-restart
        --debug
        WARNING
	/path/to/synergy.conf
 
    RunAtLoad

And on the client, I created a similar My Agent thus:

 
 
 
 
    Label
    net.sourceforge.synergy2.client
    OnDemand
 
    ProgramArguments
 
        /path/to/synergyc
	-f
	Server-Hostname
 
    RunAtLoad

A reboot on each machine (server first) and all is ready to go (and, in fact, going).

October 25th, 2008

Posted In: Educational Technology, How To

Tags: , , , , , ,

css.php