In a mirror, dimly A blog at the intersection of geek, faith and creative writing.


6
Feb/10
0

Twitter Updates for 2010-02-06

  • "The Observation Deck" (Naomi Epel) – a great source of writing prompts! #

Powered by Twitter Tools

Filed under: Twitter
5
Feb/10
0

Writing Prompt

I was poking through “The Observation Deck” (Naomi Epel) – pick a card at random and look up its description in the book, then use it as a starting point for writing.

I pulled “Choose the right name” – which concludes with an interesting exercise:

Brainstorm a list of interesting names, or pick one from the phonebook. Then sketch a written portrait of the person who might bear such a name. Assign an age, occupation and marital status. Describe hobbies, mode of dress and favourite foods. Think of three other names such a person might bear.

Filed under: Writing
4
Feb/10
1

The Phantom Of The Opera

Comparison of versions:

Sarah Brightman and Antonio Banderas

(did you know that ‘Puss in Boots’ from “Shrek” could sing?)

Michael Crawford and Sarah Brightman

Steve Harley and Sarah Brightman

(ok, so who gave them permission to re-write the lyrics?)

Gerard Butler and Emmy Rossum

(one minute he’s killing Persians in “300″ then he’s singing, who ever knew he had the voice?)

Filed under: Music
2
Feb/10
0

“Eve of the War” (from Jeff Wayne’s “War of the Worlds”)

“Wild” performing a cover of “Eve of the War” live

now, “Wild” broke up, and two members went on to form the band “Escala” (briefly called “Scala”)

Escala – Kashmir Featuring Slash (of Guns ‘n’ Roses fame)

I know that track – its been done before by the quartet “Bond”. Which version do you prefer:

Bond – Kashmir

Its a good thing that Escala renamed themselves, as YouTube turned up the “Scala” choir cover version of “Enjoy the Silence” (Depeche Mode)

which begs a comparison with other versions of the song:

Depeche Mode (the original)

Cover versions

Tori Amos

Breaking Benjamin

http://www.youtube.com/watch?v=-kd680Cz8gg

Yana

http://www.youtube.com/watch?v=gvRz0ouXOhw

Van Helsing & Van Giessen

HIM

Lacuna Coil

At the end of the day, my vote rests firmly with Lacuna Coil as being the best cover of this track.

Filed under: Music
30
Jan/10
0

Bryan Adams – “Heaven”

I was listening to a streaming radio station (on Pandora.com) that I’ve trained to play some nostalgic 80’s rock tracks. It played THE PERFECT song for the mood I was in, almost like it was reading my mind.

In a few days it’s the anniversary of my wife and I’s first date – we were married 18 months to the day from our first date – so the date has more significance than Valentines! So, a musical, emotional dedication to 16 years since the first date. (yes, and looking forward to a 15th wedding anniversary in August 2010).

Original

http://www.youtube.com/watch?v=3eT464L1YRA

Unplugged

http://www.youtube.com/watch?v=Z7b37l_B4vI

Cover versions

DJ Sammy featuring Yanou

Do (unplugged)

Leticia and Tito

Filed under: Music
10
Jan/10
0

Twitter Updates for 2010-01-10

  • Alright, I'm fed up of waking up and seeing snow outside the window. Someone bring back summer, and do it quickly! #

Powered by Twitter Tools

Filed under: Twitter
13
Dec/09
0

PHP-on-Tomcat (Part II)

The original goal of being able to run PHP on top of Tomcat was to allow simple development of PHP based applications like Wordpress and/or bbPress. To get these working I needed a database.

The wildly popular mySQL database has a nice installer for OS X. Mine installed to /usr/local. I did the install ages ago and forgot what the “root” database user password was. Ooops! No matter, there are some great resources online talking about how to go about resetting permissions. I opted for the incredibly easy, but utterly insecure method (from inside the terminal) :

  1. Stop the existing server
  2. Restart telling it to turn off permissions: mysqld_safe --skip-grant-tables --user=_mysql &
  3. Jump into the mysql shell application: mysql -u root mysql
  4. Change the “root” password: UPDATE mysql.user SET Password=PASSWORD('#########') where user='root';
  5. Persist privilages: FLUSH PRIVILEGES;

Next on the list was exposing my mySQL database to the Tomcat hosted PHP code. Step 1 was making sure I have mySQL JDBC drivers installed, Step 2 was creating a JNDI datasource in the context, and step 3 was getting the PHP to use it.

The officially supported mySQL Connector/J was a quick download. The JAR file for it was dropped into the $CATALINA_HOME/lib directly. Good to go. The context file was more of a challenge, under the $CATALINA_HOME/conf/Catalina/localhost I created an XML config file that matched the name of my webappphp.xml – where I declared the JNDI datasource. It took some tweaking and reading around but finally ended up coming together:

<Context reloadable="true">
    <Resource
        name="jdbc/mydata"
        auth="Container"
        type="javax.sql.DataSource"
        username="root"
        password="#########"
        driverClassName="com.mysql.jdbc.Driver"
        url="jdbc:mysql://localhost:3306/test"
    />
</Context>

The documentation for Quercus states

Scripts can use the jndi name directly:

<?php

  // standard PHP
  //mysql_connect($host, $username, $password, $dbname);

  // using JNDI lookup
  mysql_connect("java:comp/env/jdbc/myDatabaseName");

?>

But that doesnt help me to run Wordpress as I’m not about to go modifying their code. Never fear, there’s another option. The documentation for Quercus also says that you can put an entry into the WEB-INF/web.xml file that forces all database connections to go through the same underlying JNDI datasource:

.
.
.
    <!--
      Tells Quercus to use the following JDBC database and to ignore the
      arguments of mysql_connect().
    -->
    <init-param>
      <param-name>database</param-name>
      <param-value>jdbc/test</param-value>
    </init-param>
.
.
.

So, a quick update to point at my own datasource and wall was ready to go. I downloaded and unzipped wordpress into the PHP webapp directory, pointed a browser at http://localhost:8080/php/wordpress and found myself stepping through the famous 5 minute install. Less than 5 minutes later I was looking at the main page of a fully-functioning Wordpress install.

12
Dec/09
0

Twitter Updates for 2009-12-12

  • PHP-on-Tomcat on OS X, using a JNDI/JDBC datasource out to mysql, running wordpress – take that LAMP stack! :-) #

Powered by Twitter Tools

Filed under: Twitter
12
Dec/09
2

PHP-on-Tomcat

I am generally a Java programmer (if my day-job is to be believed) and hacking my way through Apache configuration isnt my idea of a fun evening. For some odd reason my trusty old black MacBook hasnt had the best of times when I try to enable “web sharing” and then try executing PHP scripts – all I get is a dump of the source. Time for a creative solution to the problem!

The folks that created the Resin App Server have a 100% Java implementation of PHP 5 released under the Open Source GPL license, known as Quercus. So step 1 was to download the latest release that will run on non-Resin app servers: quercus-4.0.1.war.

This was the point where I also realized that I dont have an up-to-date install of Apache Tomcat on my system either. Step 2 was to go download Tomcat 6.0.20 and install it.

Many applications need to know where Tomcat lives, and that means setting the CATALINA_HOME environment variable to point to the install. In a terminal I edited the global startup file for the terminal: sudo vi /etc/bashrc to add the line:

CATALINA_HOME=/Users/paul/Documents/Devt/3rd-party/apache-tomcat-6.0.20

Step 3 was to $CATALINA_HOME/bin/startup.sh to start tomcat and then point a browser at http://localhost:8080/quercus-4.0.1/ where I saw confirmation that all was well:

Testing for Quercus™…


Congratulations! Quercus™ Open Source 4.0.1 is interpreting PHP pages. Have fun!

I didnt like the URL though, but that’s easily changed. I simply nuked the quercus-4.0.1 directory under $CATALINA_HOME/webapps and renamed the Quercus WAR file “php.war”. I bounced Tomcat and bingo – a “php” directory I could drop files into. As a final test, I created info.php

<?php

    phpinfo();

?>

and hit it on the pretty URL: http://localhost:8080/php/info.php. All displayed correctly. I was off and rolling running PHP on top of Apache Tomcat! Stay tuned for Part II – getting Wordpress running on top of PHP running on Tomcat!

Filed under: Java, Tech
5
Dec/09
0

Flyleaf – “All around me”

I was listening to a mix over on Pandora, and was introduced to Flyleaf. Wow. Fantastic stuff. I am so glad that I have a 30% off coupon for Borders – I am going to buy a CD this weekend! (who said streaming digital music was killing CD sales?)

All Around Me

My hands are searching for you
My arms are outstretched towards you
I feel you on my fingertips
My tongue dances behind my lips for you

This fire rising through my being
Burning I’m not used to seeing you

I’m alive, I’m alive

I can feel you all around me
Thickening the air I’m breathing
Holding on to what I’m feeling
Savoring this heart that’s healing

My hands float up above me
And you whisper you love me
And I begin to fade
Into our secret place

The music makes me sway
The angels singing say we are alone with you
I am alone and they are too with you

I’m alive, I’m alive

I can feel you all around me
Thickening the air I’m breathing
Holding on to what I’m feeling
Savoring this heart that’s healing

And so I cry
The light is white
And I see you

I’m alive, I’m alive, I’m alive

I can feel you all around me
Thickening the air I’m breathing
Holding on to what I’m feeling
Savoring this heart that’s healing

Take my hand
I give it to you
Now you own me
All I am
You said you would never leave me
I believe you
I believe

I can feel you all around me
Thickening the air I’m breathing
Holding on to what I’m feeling
Savoring this heart that’s healed

Filed under: Music