Older blog entries for davidw (starting at number 411)

Manipulating ckeditor data with jQuery

I'm working on a project that utilizes CKeditor and need to manipulate the data it contains.  Since I'm familiar with jQuery and it's fairly efficient at doing that sort of thing, rather than figuring out how CKeditor manipulates things internally, I wanted to, at least to get started, access things in jQuery.  There isn't a lot of information out there on the best way to do that.  Here's what I figured out - it seems to work pretty well:

    var editor = theeditor();
    var contents = $("<div id='specialwrapperthing'>" + editor.getData() + "</div>");

    .... hack away with jQuery ....
    editor.setData(contents.html());

Basically, you just wrap up what the editor hands you in terms of the data, hack away on it, and then put the HTML back into the editor.

Syndicated 2011-03-05 14:22:21 (Updated 2011-03-05 14:37:51) from David's Computer Stuff Journal

Random github idea: show pull requests on the network

Another day, another "which ^(&^%*&*^&()* version should I use?!" with github:

https://github.com/gramos/easy-fckeditor/network

Github is nice, but very, very often all the forks are the very model of a modern major paradox of choice.

Which one should I use?   Which one is best?  Do the forks exist because 1) the original author stopped bothering? 2) because the forkers just wanted to be 'cool' and have their own fork? 3) because the forkers don't have a clue about open source and don't attempt to submit their patches back?  Who the hell knows, in most cases.   This is frustrating.

I had a random idea that might help some: if the 'network' view were able to show you, at a glance, the amount of interaction between different forks: pull requests accepted and rejected.

At least we'd get an idea of what sort of community is forming around the project, and also have an idea whether the forkers and/or the authors are good open source citizens or not.

Of course, as my friend Salvatore says, "pull requests are not conversations", but it's better than nothing.

Syndicated 2011-02-17 08:55:54 (Updated 2011-02-17 09:14:50) from David's Computer Stuff Journal

Rails Application Templates

Thanks to some friends on twitter, I recently discovered RailsWizard which is a very handy way of generating new Rails applications with the "right" things included.

I liked what it did a lot, so I took the generated file and saved it as a github gist:

https://gist.github.com/829521

Which provides me with a very handy starting place for new Rails projects.  This is a great way to get some of the housekeeping out of the way before we start: ensure we're using jQuery, add some gems that I always use like exception_notifier and will_paginate, and so on.

Syndicated 2011-02-16 21:00:39 (Updated 2011-02-16 21:54:48) from David's Computer Stuff Journal

The UnderPerformingStocks.com sale - halfway in

A few weeks ago, I had an "out-there" idea to try creating and selling a site at the same time.   So far, it's not exactly raking in a major amount of cash:

www.underperformingstocks.com is For Sale on Flippa!

At $100 with a couple of bids, it doesn't look like I'll be able to retire on it!  That said, I haven't spent a great deal of time on it, and part of the idea of the experiment was to limit the amount of time the 'new idea' would distract me from other things.  I did hope to receive a few more "audience requests" in terms of what to build on Flippa.com, though.  Hopefully, things will heat up a bit during the final two weeks of the auction, but I don't think "flipping" web sites is really a business I want to be in.  It's been fun to see how much you can build with how little, though, what with all the widgets and API's out there these days.

Since I'm a coder at heart, I also released some Ruby code that utlizes Google's stock screener API: https://github.com/davidw/google-screener - it's under the Apache license, and is kind of neat to play around with, I think, and is what I use to fetch information for the site.

Syndicated 2011-02-16 13:50:19 (Updated 2011-02-16 14:04:49) from David's Computer Stuff Journal

12 Feb 2011 (updated 13 Feb 2011 at 21:07 UTC) »

Book Review: Start Small, Stay Small, A Developer's Guide to Launching a Startup