Older blog entries for johnnyb (starting at number 188)

I have a chapter in the newly released book, Sacred Cows in Science. The book contains chapters by 17 authors and covers a variety of alternative ideas in science from biology to physics to sociology. My chapter is on whether genetic mutations are accidental or regulated (or both). Anyway, check out the book!

I posted my criticism of the green movement here .

Just released a new Javascript/Twitter/Google Maps integration tool. Also has a Rails plugin, which gives you more control, but is perfectly usable with HTML- only. See the Twitter, Google Maps, and Rails goodness here.

Grrrr.....

I broke down and bought iShowU because of great reviews. However, due to what the author claims is a Quicktime Bug, the application quit after I had spent OVER AN HOUR recording video. The whole point of getting iShowU was to do painless training sessions when I had time (like in the evening) and then distribute them. But instead of saving time, I just wasted MY WHOLE FREAKIN NIGHT!

It's not that the file is gone - I have all 114MB. However, according to the author of the software, it is UNUSABLE. AHH!

I'm about to smack my head against several walls. I had finally gotten to what I thought was a manageable amount of work, and then I get whacked by this application, and now I'm way behind, yet again, and lost my whole evening (I had spent over an hour preparing for the screencast, and had stopped half way through my first take to do it better, too).

That's $20 and a whole evening I will never see again.

Do not ever do business with InternetSecure. Ever.

I've been trying to get a stupid site linked up with them for weeks. ABSOLUTELY INFURIATING!

I've linked up sites with Authorize.net, YourPay/LinkPoint, and a number of other gateways, using a number of languages, and so on and so forth. InternetSecure advertises itself as being a drop-in replacement for Authorize.net. All I can say is that is COMPLETE B.S.!

It is _not_ a drop-in replacement for Authorize.net. For example, I was using ActiveMerchant in Ruby-on-Rails. Well, ActiveMerchant makes use of the 'encap' parameter for authorize.net. But guess what, InternetSecure ignores it! Also, the code I was using simply transmitted card information. This is fine for every gateway I've ever used. But guess what - InternetSecure doesn't support that! Again, it is NOT IN ANY WAY a drop-in replacement for authorize.net.

Then they have developers jump through hoops to get certified on their system. Just a horrendous group to do business with.

Again, despite what they tell you, it is NOT a drop-in replacement for authorize.net.

Do not EVER use Network Solutions

Okay, I've finally had it. I am vowing never to use Network Solutions again. I've put up with their crap for years because they made it easy to delegate management of their domains, but now I am freaking irate because of their hideous incompetence.

Apparently, when you transfer a domain to networksolutions.com they feel free to host their own web page on your domain for you. That's right, I just transferred two of our customer's domains to them, and what shows up today? A network solutions logo with one of their idiotic domain parking pages. I went in and set the DNS to point to the right place using THEIR OWN management tool. I then did a dig directly on the DNS server assigned to me. Guess what? NO CHANGE. Four hours later, still no change -- their DNS servers are still reporting their own informercial site as being our website.

This, along with their DNS admin tool being trash (doesn't even support TXT records -- how do you do SPF records and the like without TXT records?), has finally convinced me to find someone else for a registrar -- Network Solutions is terrible.

Setting wmode to transparent on Yahoo! Maps

Unfortunately, if you need to overlay something on top of Yahoo! maps, it won't let you, because you can't change the wmode of the flash to "transparent". IN order to fix this, you have to do a small hack of the Yahoo! Maps API. If you want to set the wmode of Yahoo! Maps to transparent, insert the following code before you create a map, but after you load the Yahoo API:


  //UGLY HACK TO FIX WMODE
  FlashTag.prototype.toStringOrig = FlashTag.prototype.toString
  FlashTag.prototype.toString = function() {
    this.setWmode('transparent');
    return this.toStringOrig();
  }

This modifies the flash tag creation to set the wmode immediately before rendering the tag.

Lots of new projects for Ruby on Rails and/or just Ruby:

As I mentioned earlier, I launched ActiveShipping which can be used either with Rails or by itself.

If you ever wanted an easy way to write forms for which portions appear/disappear based on the results of a drop-down box, I have a Rails plugin called Applicability:

http://code.google.com/p/applicability/wiki/BasicSummary

If you ever wanted an easy way to do client-side tabbed panels, I now introduct RailsTabbedPanel:

http://code.google.com/p/railstabbedpanel/wiki/BasicSummary

Neither of these require you to manage Javascript yourself -- it handles all of the Javascript generation for you in a clean manner. You can even have multiple tabbed panels and multiple applicability containers together, and nested.

Everything Going Wrong at Once
also known as
Shared memory problems on Postgres Bootup

Okay, so here's the deal. I am back in school getting a Master's in Theology. So, on Tuesdays I am at the seminary. I have one class that I need to be at the seminary during the day for - it's from 12:10PM to 1:15PM. So, I just bring all my work there and just work from the seminary for the day, and go to the class at lunch.

Today, at 11:30, my crew told me that one of our servers was very slow. At 11:50, the wireless internet at the seminary went out. At noon, I decided to use the bluetooth networking on my phone. I discover, to my horror, that the machine is completely down. I can't ssh in or anything. I call the other guys in the department --- oops, making a phone call disconnects my Internet access. We figured out it was a memory overcommit problem. I called our ISP and had them reboot the box. It comes up to a shell, and I can log in remotely. However, every page is erroring out because of the database.

And then...

The database just won't start. I try it again and again. The error log says:

FATAL: pre-existing shared memory block (key 5432001, ID 7667712) is still in use
HINT: If you're sure there are no old server processes still running, remove the shared memory block with the command "ipcclean", "ipcrm", or just delete the file "postmaster.pid".

I look using ipcs, and postgres doesn't have any shared memory blocks (and it shouldn't -- we just restarted). I tried upping shmmax. No go. I tried lowering shared memory buffer usage. No go. What is wrong with the system?

It turns out, Apache was using one of Postgresql's shared memory blocks. ipcs just showed Apache. So, I turned off Apache, and then turned on Postgresql. Viola! It worked! Then apache started just fine. The only thing I can think of is that Apache chooses its block randomly, and it just happened to hit Postgres's this time.

So, by the end of all of this, it's 12:45 (too late to go to class -- I've missed the entire reason for being at seminary during the day), and then 5 minutes later the wireless comes back on.

Whew! What an hour!

11 Sep 2007 (updated 11 Sep 2007 at 21:47 UTC) »
warbler is awesome -- it allows you to _easily_ make Ruby- on-Rails applications Jruby-ish, and war'd up to deploy in a container. Here are the instructions for setting this up under JBoss, but except for the last step, should run under any standard Java web container.

Here's the steps:

1) install jruby 2) install warbler

jruby --command gem install warbler

3) Do config

jruby --command warble config

This creates a file called config/warble.rb which can be used to add gems and other configuration goodness.

4) If you're going to use ActiveRecord-jdbc, then following these instructions:

Download ActiveRecord/JDBC.

Install ActiveRecord-jdbc:


jruby --command gem install /path/to/ActiveRecord-jdbc-0.5.gem

Add this gem to warble.rb:


config.gems << 'ActiveRecord-JDBC'
config.gems << 'jruby-openssl'     #not required makes other things 
easier

Add the following lines to environment.rb:


if RUBY_PLATFORM =~ /java/
  require 'rubygems'
  RAILS_CONNECTION_ADAPTERS = %w(jdbc)
end   

If you are connecting straight to a PostgreSQL database, you can just include the postgres-pr gem in your warble.rb file, and keep your database.yml file normal. If you are using JDBC, following the latest tips for that (it seems to change) for configuring database.yml. If you are using a JNDI connection, then specify it like this:


production:
  adapter: jdbc
  jndi: java:putyourjndipathhere

Configuring your datasource in JNDI is up to you :)

5) Warble it

jruby --command warble

5) Deploy it

cp yourfile.war /path/to/jboss/deploy

The only problem I have right now is that on every request it generates a warning message about having to close my connection for me. I'm not sure if that's a warble config thing or a Postgres thing or a JRuby thing or a JDBC thing.

I hope I didn't leave anything out :)</pre>

179 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!