James Revillini

Say 'no' to styrofoam.

Category: software (page 1 of 3)


iTunes 9.2 hangs when syncing voice memos

If you just need a workaround so you can access other, non-voice-memo features through iTunes, such as backup, music sync, app sync, etc., then follow this procedure:
1. disconnect your iPhone from the computer
2. fire up iTunes
3. open Preferences (Edit > Preferences)
4. click the Devices tab
5. select “Prevent iPods, iPhones, and iPads from syncing automatically (see attached)
6. Click OK
7. plug in the iPhone.
It will still backup the device, but what you do from there is up to you.  It will not get your voice memos transfered to the PC, but theoretically, you should be able to go to the Music tab when you click on the iPhone and select Sync Music, but deselect the voice memo option.
Until a fix is released, use one of the other workarounds to get your memos copied to the computer.

[SOLVED] Ubuntu Startup-manager killed my windows partition entry in GRUB2

The issue

I had a scary thing happen the other day: the windows xp entry on GRUB2’s boot screen went missing!  This happened shortly after the windows partition had been encrypted with a McAfee product.  Ubuntu didn’t remove the entry itself; it was actually only after I tried to make a change to the startup configuration using a program called Startup-manager (you may have it in System > Administration) that the windows entry was removed. It was bad enough that Ubuntu could no longer see any files on the windows partition (mounted as /windows), but now I had no way to boot into windows to retrieve files.

The fix

And of course, I had no freaking clue how to manually modify GRUB2’s startup screen.  But after some digging, I figured out how to do it.  This worked for me in Ubuntu 9.10 Karmic Koala.  Hopefully it will save someone else’s day:

  1. Figure out where windows is.  Is it /dev/sda1 (very likely)? /dev/sda2?  To do this:
    1. System > Administration > Disk Utility
    2. Click each partition and find the one which matches the size of your bootable windows parition and which, when selected, shows a partition type of HPFS/NTFS. Example:
    3. Note the location of the partition; it is the last line of the descriptors of the partition. In the screenshot above, mine is /dev/sda1.
  2. Press ALT+F2
  3. enter the command gksudo gedit /etc/grub.d/40_custom
  4. below the comments in this file, and below any other entries which may have been added by one thing or another, add the following:
    [sourcecode language=”plain”][/sourcecode][/sourcecode]

    echo “Adding Windows XP on {LOCATION OF YOUR WINDOWS PARTITION}” >&2
    cat << EOF
    menuentry “Windows XP Professional (on {LOCATION OF YOUR WINDOWS PARTITION})” {
    insmod ntfs
    drivemap -s (hd0) ${root}
    chainloader +1

  5. Replace {LOCATION OF YOUR WINDOWS PARTITION} in the code above with the location of your windows partition.
  6. Replace {JUST THE LAST NUMBER OF THE LOCATION OF YOUR WINDOWS PARTITION} with the last number of the location of your windows partition. E.g. /dev/sda1 would be 1.Your file will now look something like this:
  7. Save the file and close the editor.
  8. Press ALT + F2.
  9. enter the command gksudo grub-mkconfig

That should be it.  When you reboot, you should see your windows as a bootable option again.


The moral of this tale is to avoid startup-manager for grub configuration changes unless you’ve not got funky partitions. Keep in mind that future versions of start-up manager may fix this issue; the version i’m using is 1.9.12-ubuntu1.


I would not have been able to troubleshoot this issue if it weren’t for the following gracious contributions to the global knowledgebase.

[SOLVED] Screen Resolution resets to something undesired in Ubuntu 9.10 Karmic

Assuming you have a monitor that supports some high resolution, say 1680 x 1050, and you’re using an nvidia card:

  1. System > Administration > Hardware Drivers
  2. Make sure the latest recommended nvidia proprietary driver is activated (if not, do it and reboot)
  3. System > Preferences > Display (it should ask if you want to use the proprietary config screen – select ‘Yes’)
  4. Select X Server Configuration
  5. Set the resolution to what you want and ‘Apply’, then quit the nvidia-settings screen.
  6. System > Preferences > Display (when it asks this time, select ‘No’)
  7. Click ‘Apply’
  8. Click ‘Keep configuration’ (assuming everything looks OK)
  9. Click Close

When you reboot, everything should be preserved.  I still notice a flicker on the boot-up screen when I think it tries to reset it to something else, but it should stay at the resolution you specified.

Thank you, open source

Before I get started on yesterday’s and todays scripts, I’d like to take a moment to thank all the open-source developers who are making my computing experience possible.  Here is just some of the open source software that I’ve used during my run on 100 Days.

  • jQuery & JQuery UI – javascript & js/css library, respectively
  • jQuery plugins: SVG, jMP3, random code snippets from a lot of sites …
  • GIMP – for my boitmap graphics
  • InkScape – for vector graphics and SVG conceptualization
  • gedit – GNOME Text Editor
  • Firebug – Javascript debugging would be IMPOSSIBLE without this
  • Firefox
  • WordPress
  • Ubuntu (currently the “Jaunty Jackalope” version) – my operating system
  • Songbird – musical inspiration

Response to Making SVN trust a new root CA certificate

This is in response to Making SVN trust a new root CA certificate.  I wanted to write this there, but I can’t send comments due to a site error.

@GEEK: Thanks for starting this discussion. The previous comment is the one that helped me get my post-commit hook working with VisualSVN Server on an XP box. I was writing a hook to update my web directory from the SVN repo on every commit.

@Other contributors: Thanks for adding your comments which lead me to the right solution to properly make my server trust istself!

Just to consolidate the steps:


  1. Hit the repo in IE at whatever its address is; e.g. https://server:8443/path/to/svn/
  2. It will tell you the cert is untrusted. Click view certificates.
  3. click Install certificate…
  4. hit Next
  5. select Place all certificates in the following store
  6. click Browse…
  7. select Trusted Root Certificate Authorities
  8. hit OK
  9. hit Next
  10. hit Finish
  11. hit Yes, OK, OK, YES!
  12. Start>Run>services.msc
  13. restart VisualSVN server service Now your hooks on that machine should not have any issue updating from itself.

Kill Dreamweaver (works every time!)

Weirdest thing: if you create a stylesheet that is linked to from one of your pages in dreamweaver and it contains the line

.popup {}

int it, dW dies while trying to start up.  Great parlour trick!

Possible bug in Error Tracker Pepper for Mint Statistics

I think I found a bug in Error Tracker 1.06, a plugin for Mint.  I came across this one because even though I had taken measures to redirect a certain incorrect URL that was apparently getting a lot of hits, the hit count on that URL continued to climb.  I ran my own queries against the database to confirm my suspicion that the numbers were wrong.

My findings and solution are found in comments 17, 18, and 19 on the Error Tracker page at XHTMLed.com.

eLumen Community Forum

I just launched the eLumen Community Forum – it is a place for eLumen users to collaborate on solutions, compare notes, chat about higher education assessment strategies, and get answers about the technical side of running eLumen.

By day, I am the eLumen administrator at Tunxis Community College, and in working with eLumen I’ve run into all manner of snags – I assume that other colleges which are supporting their own eLumen server may be having the same issues, and I’d like for them to be able to benefit fro the solutions we’ve found, and vice versa.

The key discussion area on the forum, I think, is going to be the Mashups board. The Mashup board is the place to discuss bridging eLumen data with other data sources to produce new ways to navigate the data. The reporting mechanism baked into eLumen is pretty good for basic analysis, but to show the numbers in the context of other things, such as a student’s e-Portfolio work, or to deliver the numbers in an interactive web application where relationships are links to new views, would require the data to be brought into something else.

Anyway, enough about that here. No one reads this blog anyway. But I also want to say that I’m excited because phorum is AWESOME software for a forum site, and I’ve already made my own template (called orange on olive), which is featured – you guessed it – at the eLumen Community Forum.

PHP Script: Convert Excel or tab-delimited file to html table

Here’s a script which I wrote today while on the jorb.  The purpose was so that someone could copy and paste from an excel spreadsheet into a textarea, click a button, and voila: an html table.

The nice thing was that when I pasted Excel data into the textarea, it was tab-delimited with line breaks.  At that point, all I needed to do was some replacements and throw a table wrapper on it.

Here’s the code for the conversion function (sorry – i haven’t installed a php code parser yet to style this more nicely):

* convert tab delimited file to html table
* @input string tab-delimited text
* found at http://james.revillini.com
* note: you are not required to keep the above copyright notice in this code.
function tabs_to_table($input) {
//define replacement constants
define(‘TAB_REPLACEMENT’, ‘</td><td> ‘);
define(‘NEWLINE_REPLACEMENT’, ‘</td></tr><tr%s><td> ‘);
define(‘TABLE_BEGIN’, ‘<table><tr><td> ‘);
define(‘TABLE_END’, ‘</td><tr></table>’);</code>

//replace all tabs with end-cell, begin-cell
$input = preg_replace  (’/\t/’  , TAB_REPLACEMENT  , $input);

//split the list on linebreaks
$rows = preg_split  (’/\r\n/’  , $input);

//replace all linebreaks with end-row, begin-row (with or without altRow class)
$output = ”;
foreach ($rows as $index => $row) {
$output .= $row . sprintf(NEWLINE_REPLACEMENT, ($index%2?”:’ class=”alt”‘));

//build table
$input = TABLE_BEGIN . $output . TABLE_END;
return ($input);

Joomla Tip: “mgmedia2 component not installed. Please install first to use the plugin.”

If you are seeing “mgmedia2 component not installed. Please install first to use the plugin.” then you probably either

  1. just tried to uninstall the mgmedia2 thing from your Joomla admin panel, or
  2. are trying to install mgmedia2.

If you want to uninstal mgmedia2, make sure you go to Installers > Mambots and uninstall the mambot/plugin as well.

If you want to install mgmedia2, you missed a step and you still need to installed the component in Installers > Components. See readme.

I just wanted to put this out there in case anyone is struggling with it.

Older posts

© 2017 James Revillini

Theme by Anders NorenUp ↑