Codedrop™ Weblog

Drop’n some code and other tech tidbits…
  • Home
  • Google Shared
  • About Me
  • Reference Links
Rss feed Subscribe

Entries for the ‘Programming’ Category

Grails and Oracle XMLDB (XMLType)

Apr.30, 2010 in Grails, Oracle Comments Off

Trying to integrate support for Oracle XMLDB in a grails app didn’t turn out to be as straightforward as you might think.  By putting the xmlparserv2.jar file in the $GRAILS_HOME/lib folder I was suddenly presented with SAX parse errors…
Luckily I stumbled across this post by Graeme Rocher who had a similar problem and identified [...]

SelectorGadget makes identifying page elements a breeze!

Jan.11, 2010 in Programming Comments Off

A recent railscast pointed me at a handy tool that has helped tremendously in speeding up my UI development efforts.  In past, I would use FireBug to highlight items on a page and identify the associated id / class.  This worked ok, but did not aid in narrowing down my selector in the efficient mannter [...]

Tags: CSS, UI

Add some color to your Capistrano scripts

Nov.27, 2009 in Rails Comments Off

The beauty of ruby makes it simple to add some colorful syntax highlighting to log messages that are displayed in your capistrano scripts.  Here’s a chunk of code I added to my utility.rb file that is included by my capfile that performs the magic.

def colorize(text, color_code)
“#{color_code}#{text}\033[0m"
end

def red(text); colorize(text, "\033[31m"); end
def boldred(text); colorize(text, "\033[1;31m"); end
def green(text); [...]

Capistrano Callbacks

Nov.18, 2009 in Build Automation, Rails Comments Off

Neat way to pre-initalize something in capistrano before a task is run
on :start do verifyParametersAndInitialize()end
callback options:

:before, triggered before a task is invoked
:after, triggered after a task is invoked
:start, triggered before a top-level task is invoked via the command-line
:finish, triggered when a top-level task completes
:load, triggered after all recipes have [...]

Tags: Capistrano

Automate your non-rails db migrations with Capistrano and AutoPatch

Nov.10, 2009 in Build Automation, Databases Comments Off

After working in a rails environment for the past year I found it terribly difficult to go back to traditional database deployment / upgrade practices.
Migrations are a beautiful way to properly version, co-ordinate and apply the changes you need to your various database environments.  I never knew of a way to do this in a [...]

Tags: Migrations

OpenSSL Certificate Formats / Conversion

Sep.15, 2009 in Java, Security Comments Off

This past week has left me having to learn much more about https certificates then I ever thought I would care to know…   Here’s a synopsis of some of the highlights of my learnings as pulled from various resources on the web.
OpenSSL supports several certificate formats. Certificates are based on the DSA signature algorithm and [...]

Tags: certificate, SSL

Create a default ‘usage’ target for your ANT project builds

Aug.14, 2009 in Build Automation, Java Comments Off

I keep coming across instances of ant build files where developers have hard coded a usage target that outputs target actions.  This is not required and should be avoided as it is often not maintained.  Instead, properly maintain the description attribute of each target and use a default target as below:  

<project name=”foo” basedir=”.” default=”usage”>

…

<target name=”usage”>
        [...]

PERL script for identifying installed modules.

Jul.31, 2009 in PERL Comments Off

Trying to identify all modules installed on your local server?… try this command:Note: First time you run you might have to configure CPAN… for the most part defaults are good but pick a good local mirror.

perl -MCPAN -e ‘print CPAN::Shell->r ‘

Package namespace installed latest in CPAN file
Archive::Tar [...]

Tags: PERL

MaxPermSize and how it relates to the overall heap

Jul.16, 2009 in Java, Programming Comments Off

Grails application throwing OutOfMemory error and PermGen space was exceeeded errors… Looks like grails applications require a fairly large permgen space… Here’s a useful  article on how to address this.

Tweet This Post

Tags: Java, Memory

Returning raw XML string from Oracle XDB within Groovy / Grails

Jul.13, 2009 in Databases, Java, Oracle Comments Off

Here’s a quick solution for trying to extract the raw xml string from an Oracle XDB database when working with Grails.
After an initial attempt to hardcode a hibernate query to return the raw sql using .getStringVal() as follows:
SELECT x.id, x.xmlData xmldata.getStringVal(), lines.*
FROM xml_requests x
XMLTable(‘declare [...]

Tags: Grails, Groovy, Oracle, XMLDB
« previous entries  
Next Page »
  • Tag Cloud

    Blackberry Capistrano certificate Configuration CSS DNS-323 DOS Dreamhost EMS Fedora firebug GMail Google Grails Groovy ie Java jQuery JSF Linux Mac Mac OSX MacPorts Memory Migrations Oracle PERL Rails Ruby Safari SOAP WebService Spring SSL Tibco Time Machine toolbar Trac UI video sony m2ts vlc VMWare Windows XMLDB

    WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

  • Blogroll

    • A List Apart
    • Anassina
    • Just Be Kuz
    • Mashable
    • Poker Dreams Online
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Calendar

    September 2010
    M T W T F S S
    « May    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  
  • Categories

    • Databases (5)
      • Oracle (4)
    • Dreamhost (1)
    • General (25)
    • Google (1)
    • Mobile (1)
    • OS (17)
      • Linux (11)
      • Mac OSX (5)
      • Windows (2)
    • Programming (26)
      • Build Automation (3)
      • Grails (1)
      • Java (8)
      • JBoss (1)
      • jQuery (1)
      • JSF (1)
      • MySQL (1)
      • PERL (1)
      • Rails (4)
      • Ruby (3)
    • Security (1)
    • Spring (1)
    • Tibco (4)
  • Recent Posts

    • How to address TIBCO (Send HTTP Request) SSL Certificate Problems
    • Grails and Oracle XMLDB (XMLType)
    • Getting ‘YYYYMMDDhhmmss’ date format in a MS Windows script… yuck!
    • Mysql, Rmagick on Snow Leopard, Homebrew to the rescue!
    • Use your DNS-323 for Time Machine backups.


Green Web Hosting! This site hosted by DreamHost.

© 2007 Codedrop™ Weblog - SafiTech Theme

Full RSS - Comments RSS

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.