Wednesday, October 14, 2009

Kahona PHP framework: You say Kahona, I say Kohana php

The Kohana PHP framework was news to me today, and so I am reading up on it. I am posting this hear for in the event that I might be inspired to write a little something about it, but more so, because SEO for Kohana site didn't take into account that someone might introduce it to me as "Kahona." Go ahead, google kahona php, and try to fathom getting to Kohana from there.

Saturday, October 10, 2009

Virtual PC 2007 corrupted ubuntu vm!!!

But not really-- the fix was simple.

I do my development on a virtual ubuntu linux machine under Virtual PC 2007 on my Vista laptop: it ensures that wherever I go, my work can come with me. I was reading about the next release of VPC ("Virtual PC") on Microsoft's website, and I was intrigued to check it out. Part of the installation instructions said to verify that the CPU can handle virtualization and that the BIOS virtualization feature is enabled. That led me to a BIOS update (ok, 12 versions worth, if they're totally sequential). Once I was up and running, I set out to install from a fresh Ubuntu .iso just because... then when I went to try my old VM ("with all my current and past development"), I got a nasty corruption error!! ARrrGghhh!!

I didn't panic. But I was not thrilled.

Long story short: VPC setting "Bios/CPU Virtualization" is VPC-wide. I disabled virtualization in bios which in turn turned it off in VPC settings, and voila, my old vm was back.

Still confused why I cannot get ubuntu 9.02 to install under vpc2007 though...

Thursday, August 27, 2009

mod_proxy_html.so 3.0.1 for SuSE - how to compile apache module

I am not particularly proficient in compiling apache modules or anything, but since mod_proxy_html doesn't come as a binary, one has to compile mod_proxy_html.c from source. Here is my story, at least in SuSE 10.x.
  1. Download v3.0.1 under "Availability": http://apache.webthing.com/mod_proxy_html/
  2. apsx is not in my path, and gcc hurt my head, so I did:
    /usr/sbin/apxs2 -c -I /usr/include/libxml2 -i mod_proxy_html.c
    called from within the folder to which I extracted mod_proxy_html.c in step 1 above. Note: this overwrote my previous mod_proxy_html.so (but I am ok with that).
  3. Got some compiler warnings followed by a success message! It worked, but config has changed somewhat from v2.5. I next spent some time updating config.
Some notes:
  • in vhost .conf's or http.conf
    LoadModule proxy_html_module /usr/lib/apache2/mod_proxy_html.so
    is unchanged but worth mentioning for first time users..
  • Looks like the new directives (shown in the sample/base proxy_html.conf) are usable anywhere in your vhost or httpd.conf config files. Order appears to be important... Mine, in testing, looks like:
    SetOutputFilter proxy-html
    ProxyHTMLDoctype XHTML
    ProxyHTMLExtended On
    ProxyHTMLURLMap /app_context/ / R

    ProxyHTMLLinks a href onclick
    ProxyHTMLLinks embed src
    ...

    Funny thing is, though, embed is not valid xhtml, so it's getting totally wiped out of source! To get around that, I set:
    ProxyHTMLDoctype XHTML Legacy
    Better would be to get away from "embed" for this inline PDF.
What mod_proxy_html 3.0.x brought to me, previously only familiar with 2.5.x, was more configuration, external to the binary. I just needed to add "embed"->"src" which did work, but ProxyHTMLDoctype sucked the whole element out in the first place! (see above)

Tuesday, September 12, 2006

Flex development workflow with free Flex SDK

My feet... are tickled by warm, sparkly water. I haven't spent the time to get them wet yet, but my appetite is certainly whetted!

I thought I'd share my workflow, since it's not clear to me whether or not the foss mxml editor is available for download at this time or not..

The tools:
  • MXML Flex SDK (the command line compiler)
  • EditPlus (great text editor)
  • Command Line Interface (Dos Window)
Once Flex SDK is installed-- setting up Edit Plus to compile mxml:
  1. In EP, go to Tools>>User Tools: Add Tool
  2. Command (browse to mxmlc.exe)
  3. Argument $(FilePath)
  4. Initial directory "$(FileDir)"
    1. note the double-quotes above.. If you're under "Program Files" and other such crummy directory names, you'll want quotes to encompass the path as a single argument
  5. Check Capture Output
If this is your only User Tool, you can use CTRL-1 to execute compilation... if all goes well, check out the output panel at the bottom of EditPlus for progress.

The end result of compiled mxml is swf. Because you have the Flash 9 player installed (you do, don't you?), you can execute the compiled swf at the command prompt or by a dbl-click on the compiled file in explorer. I recommend the former, b/c you can do a simple Up Arrow to recall previous command, and voila, you've got your freshly compiled swf running!

If you know of a better way, please let me know. I realize this is a far cry from Flex Builder, so don't let me know that. :D

Installing the free Flex SDK and Java JDK 1.5 SDK

So I have the not-so-unique but incredibly exciting none the less experience of attending FlashForward 2006 in Austin, TX. It's incredible-- a whole crowd of folks just like me: creatives, innovators, software developers, musicians, artists.. I love it.

My interest was piqued by Flex 2 by a brilliant presentor and Flex developer Aral Balkan. I mostly appreciated that he didn't talk designer-- he spoke geek.. Real, hardcore OOP. And here's what I gathered: Flex is simply incredible. But I donna gotta no moolah, so I intend to go the cheap route: FREE Flex SDK and Edit Plus for writing MXML. We'll see how long I last like this, but I just want to get my feet wet.... that CS degree has got to be good for something :D

So I ran into a few stumbling blocks thus far, and here are my experiences and solutions:

Downloading the Free Flex SDK:
http://www.adobe.com/products/flex/
Click that Developer tab and select Download Flex SDK. You'll need a macromedia/adobe user/pass but registration is free (and you should already have one, right?).

Installing the Flex SDK:
http://www.adobe.com/support/documentation/en/flex/2/install.html#installingflex2sdk

Downloading the free JDK 1.5:
http://java.sun.com/javase/downloads/
Find JDK 5.0 Update 8 and click Download. I then got jdk-1_5_0_08-windows-i586-p.exe, "49.52 MB"

Installing JDK was a troublesome bother for me at first. I kept getting an error talking about Invalid drive over and over! I overcame this remnant/ghost network drive by mapping my own c drive to that disconnected, phantom network drive like this: \\MyComputerName\c$ The C: drive doesn't even need to be shared for this to work.

I hope this helps somebody....

Thursday, January 19, 2006

javascript onload test

Friday, May 14, 2004

Iterating Items collections in VBScript - why items don't behave

Here's an interesting Microsoft knowledge base article I stumbled across that discusses a common mistake on iterating an Item collection.. The premise is that any property/method on a given Item in the collection always references the collection's Item directly: be sure to use a single reference instead of referencing the Item multiple times.

Wednesday, May 12, 2004

SQL Server sp_OAGetProperty iterating files collection

So I'll start off actually with a question:
Using SQL Server stored proc sp_OAGetProperty, how can I iterate a file directory to manipulate each file one by one? Currently, I've gotten as far as getting the files collection, but I can't seem to get the sp_OAGetProperty to use Files.Item in any subscripting/indexed way. All FileSystemObject examples use a foreach, which, of course, is not available using sp_OAGetProperty or sp_OAMethod.