Blog   About   Contact

What do you think...? MySQL Toad

I just came across Toad for MySQL

 image

Please let me know if you think it's worth a try and if it's a good replacement for MySQL WorkBench (which contains more bugs after every update!)

WHOIS your Daddy?

I was playing around with querying a whois server. Actually I didn't know it was that easy...

Here's the code:


<cffunction name="getWhoisData" access="public" returntype="string" hint="I return data from a whois server">
    <cfargument name="whoisQuery" type="string" required="true" hint="e.g. 'domain microsoft' or '?' to show whois server help-commands">
    <cfargument name="whoisServer" type="string" required="false" hint="e.g. whois.ripe.net. Default server is whois.internic.net">

    <cfscript>
        var whoisData = '';
        var whoisClient = createObject("java","org.apache.commons.net.WhoisClient");
        
        // use default whois server?
        if ( not isDefined("arguments.whoisServer") ){
            arguments.whoisServer = whoisClient.DEFAULT_HOST;
        }    
        
        try {
            whoisClient.connect(arguments.whoisServer);
            whoisData = whoisClient.query(arguments.whoisQuery);
            whoisClient.disconnect();
        } catch (Any exception) {
            whoisData = exception.message;
        }

        return whoisData;
    
</cfscript>
</cffunction>

Some examples:


<cfoutput>
    <h1>? [whois.internic.net]</h1>
    <pre>#getWhoisData('?')#</pre>    
    <h1>domain microsoft.com [whois.internic.net]</h1>
    <pre>#getWhoisData('domain microsoft.com')#</pre>
    <h1>=microsoft.com [whois.internic.net]</h1>
    <pre>#getWhoisData('=microsoft.com')#</pre>    
    <h1>registrar TUCOWS INC. [whois.internic.net]</h1>
    <pre>#getWhoisData('registrar TUCOWS INC.')#</pre>    
    <h1>-G -B 192.113.224.88 [whois.ripe.net]</h1>
    <pre>#getWhoisData('-G -B 192.113.224.88','whois.ripe.net')#</pre>    
</cfoutput>

Ant + Subversion - How to list revision numbers

Today I needed a way to list all revision numbers of a repository.

I came up with the following solution:

Notes:
- svnant required;
- subversion called from command line.


<project name="buildexample" basedir="." default="svn.revisions">
        
    <!-- Setup svnant -->
    <import file="svnant.xml"/>
    
    <!-- Temp -->
    <property name="tempDir" value="C:\\DATA\\TEMP\\${ant.project.name}" />
    
    <!-- svn repo url -->
    <property name="svn.url" value="YOUR REPO URL HERE" />

    <target name="prepare">
        <!-- Create temp directory -->
<mkdir dir="${tempDir}" />
    </target>

    <!-- Set svn.revisions property -->
    <target name="svn.revisions" description="Sets property: svn.revisions" depends="prepare">

        <!-- creates log.xml for reading revisions -->
        <exec executable="svn" outputproperty="svnlog.out" output="${tempDir}\\log.xml" >
            <arg line="log --xml -v ${svn.url}" />
        </exec>
        <xmlproperty file="${tempDir}\\log.xml" collapseattributes="true" />     
        
        <property name="svn.revisions" value="${log.logentry.revision}" />
    
        <echo>${svn.revisions}</echo>
    
        <input message="Select Start Revision" validargs="${svn.revisions}" addproperty="svn.startRevision" />
        <input message="Select End Revision" validargs="${svn.revisions}" addproperty="svn.endRevision" />
    
    </target>

</project>

Please let me know if you think there's better way to list revision numbers.

BOOKMARKS in Eclipse,OPENS frequently used FILES!

Just stumbled upon on article of Luis de la Rosa which explains how to use bookmarks in Eclipse to track important lines of code.

This feaure is really handy for fast opening frequently used files in Eclipse e.g. Transfer.xml.cfm or i18n files.

Am I the only one who never used bookmarks in Eclipse before?

USE Ant.....it will save you a lot of time!

Jim Priest has a really nice wiki focussed on using Ant.

Check it out

WireShark - PERFECT Network Sniffer

You want to ANALYSE your network traffic?

Take a look at WireShark !!

MySQL Workbench ROCKS!!

Working with MySQL databases?

Check out the Beta release of MySQL Workbench !!!!

Linux Administrator Cheat Sheet

http://tiger.la.asu.edu/Quick_Ref/linux_quickref.pdf

Apache Cheat Sheet

http://www.digilife.be/quickreferences/QRC/Apache%20Quick%20Reference%20Card.pdf

Linux Cheat Sheet

Just came along a nice cheatsheet for Linux.

http://www.hpcc.uh.edu/usergroup/20050225/linuxquickref.pdf

BlogCFC was created by Raymond Camden. This blog is running version 5.9.004.