Posted on Friday, November 21st, 2008 at 7:19am by Rob Wilkerson
Because I use Dropbox to share selected runtime data (read: Firefox profile information) across machines and because I occasionally forget to exit the runtime environment (read: Firefox) when I move between those machines, Dropbox creates conflicted files from time to time. The conflicted files are saved separately and are named something like this:
places (my.machine.name's conflicted copy 2008-11-13).sqlite
The file above is my Firefox bookmarks database. I have no idea how it came to be in a conflicted state, but the ugly truth is that I don’t care. I assume that Dropbox saves these files as a safety measure against losing their customers’ data and so that the customer can perform a diff on those files if they choose. I don’t choose. I keep convenience files in my Dropbox, not critical files, so the files themselves are not worth the effort it would take to find and evaluate the delta between the “good” file and the conflicted file.
To that end, I’ve taken to simply removing them and because I don’t want to browse the directory structure or do this in any other manual way, I let my operating systems do the work for me. This is easy in Unix and, since two of my machines (my two primary machines) are Unix-based (OS X and Linux), it’s easy for me:
$ cd ~/Dropbox
$ find . -type f -name "* conflicted *" -exec rm -f {} \;
Poof. Now they’re deleted and Dropbox will delete them from my Windows boxes for me. I’m sure that there’s a way to do something similar on Windows, but my DOS skills atrophied many moons ago.
dropbox, sync, linux, mac, cli
Posted on Thursday, November 20th, 2008 at 7:59pm by Rob Wilkerson
In my life, particularly my technical life, there are a number of things that I do regularly, but not frequently. A consequence of the lack of frequency (or maybe of getting older) is the inability to remember exactly what I did to accomplish the task successfully the last time I did it. A consequence of the regularity is that my inability to remember annoys me. I know I’ve done it, I just can’t remember how.
One of those things that I need to do regularly, but infrequently, is edit Greasemonkey scripts for Firefox. All too often, I select Tools > Greasemonkey > Manage User Scripts > [Script I Want to Edit] > Edit only to be seized by that familiar paralysis that is normally reserved for trips to the refrigerator when nothing happens.
I know exactly why nothing happens, I just can’t remember how to fix it. Fortunately, that’s what blogs are for, so here are the steps to set (or update) the default editor for Greasemonkey scripts:
- In the Firefox address bar, type about:config and press Enter.
- In the Filter input, type greasemonkey.editor.
- If the preference exists, just double click on the preference name and, in the popup, enter the file path of the preferred editor.
- If the preference does not exist, right click in the preference list and select New > String. When prompted for the preference name, type greasemonkey.editor and press OK. At the next prompt, enter the file path of the preferred editor.
greasemonkey, firefox, configuration
Posted on Thursday, November 20th, 2008 at 10:40am by Rob Wilkerson
Because I regularly move between operating systems, I often need to use Windows-created files on Linux. Because of the difference in EOL notation between the operating systems (notice how I carefully avoided any editorial comment on that difference?), that means regularly encountering the ^M character.
While I’ve never found a situation where the character creates a real problem for me, it’s certainly annoying to see those things all over a large file. In the past I’ve used elbow grease and/or various shell scripts to clear these, but today I found out that Ubuntu (probably other distros, as well) offers a utility to do this quickly and easily.
The package is named tofrodos and, while not installed by default, is available in the repository. To install & use:
$ sudo apt-get install tofrodos
$ dos2unix <file to convert>
Couldn’t be easier, right? This is the thing I love best about Linux.
linux, shell, utilities
Posted on Monday, November 17th, 2008 at 10:10pm by Rob Wilkerson
I’ve written about Dropbox, I’ve written about Firefox, I’ve written about synchronizing Firefox through Dropbox. In fact, I’ve written about using Dropbox to sync Firefox twice. I’ve also written about using Gnome Do to launch bookmarks (albeit as an update to a post about using Launchy to do so).
Shortly fter applying a more targeted technique for synchronizing Firefox through Dropbox, I realized that Gnome Do had stopped indexing bookmarks on my Linux machine. After looking around and asking a few questions, I realized that Do had been updated so that it no longer indexed bookmarks.html, but rather included a JSON parser that parsed the Firefox backup files that are created automatically. That required one additional change:
$ cd ~/Dropbox/Application Support/firefox/profile-share
$ cp -r ~/Dropbox/Application Support/firefox/profiles/wg3x0vhj.dropbox/bookmarkbackups/ .
$ cd ~/.mozilla/firefox/erbbyfam.default
$ mv bookmarkbackups bookmarkbackups.orig
$ ln -s ~/Dropbox/Application Support/firefox/profile-share/bookmarkbackups bookmarkbackups
After restarting Do, I was able to launch my Firefox bookmarks without a single click.
firefox, dropbox, sync
Posted on Monday, November 17th, 2008 at 2:06am by Rob Wilkerson
How can you not love The Onion? This hard-hitting bastion of journalism posted their own feature matrix comparing the next releases of OS X and Windows. Want to know which OS is so aesthetically pleasing that distracts users from its issues? Got it. Want to know which OS is best suited for running Snood and porn at the same time? Got it.
Be prepared before you buy. You don’t want to be caught by surprise the first time you try to play Snood while downloading the day’s porn.
humor