Skip to content

Mcabber Update

The only thing I wanted to add to this,

It’s nice to filter you list of users based on their status. If someone is offline, for example, I don’t want to see them in my list. Likewise if they’re away.

from inside mcabber, type:
/roster hide_offline

or, set an entry in your configuration. From the sample mcabber config:

# You can set up a mask to filter buddies and display them according to
# their status. The mask should contain the shortcut letters of the
# status you want to see ([o]nline, [f]ree_for_chat, [d]o_not_disturb,
# [n]ot_available, [a]way, [_]offline).
# For example, to display everybody the filter should be “ofdna_” (default).
# To display only the connected buddies, use “ofdna”.
# Please note that this option is only used at startup (once mcabber is
# running you can use “/roster display”).
#set roster_display_filter = ofdna_

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

My Xresources

I put this in a file, .Xresources, in my home directory. It is loaded automatically each time I create a new shell, I’m not sure if it’s enabled by default or if something I installed did it.

! rxvt settings
rxvt*font: 12X15
rxvt*saveLines: 1500
rxvt*scrollBar_right: true

# Index
color index     cyan           black  ~l      # Mailing list
color index     yellow         black  ~N      # New
color index     yellow         black  ~O      # Old
color index     magenta        black  "! ~C ." # No To: or Cc: (newsdeliver)
color index     blue           black  ~T      # Tagged
color index     white          red    ~F      # Flagged (important)
color index     red            black  ~D      # Deleted

# Quoted messages
color quoted    yellow          black
color quoted1   red             black
color quoted2   cyan            black
color quoted3   green           black
color signature magenta         black

# Smileys:   :-)   ;-)   :-/  :-(
color body      brightwhite     black "[;:]-[)/(|]"
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Use RXVT With Cygwin

I’m starting a series of posts about my cygwin setup.

One of the main reasons, if not the main reason for installing cygwin is employ the use of a bash shell.  By default cygwin provides a link to the cygwin bash shell in the Start menu and on the desktop. The default cygwin shell is a bit ugly and I really prefer RXVT (ouR eXended Virtual Terminal).  RXVT it is not installed by default, you must select it during setup.  Rxvt’s $TERM variable is sets to “xterm” which is more universally recognized by other applications and ensures maximum interoperability with other systems.  Also, rxvt is far more configurable than the cygwin term.

Here’s how I’ve configured mine:

C:\cygwin\bin\rxvt.exe -sl 1500 -e /bin/bash --login -i

Pretty straight forward.

Hat Tips:
Infrablue

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Follow RTC on Twitter

We only tweet from the console!

http://www.twitter.com/reverttoconsole

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Integrating JavaScript Tests with Continuous Integration

At my current client I’ve been building a rather complex rich client app using ExtJs. The team has written a lot of JavaScript code, and has been writing a lot of JavaScript unit tests as well.

We’ve gone through several unit testing tools along the way trying to solve some logistical problems. We started with JSUnit, added Selenium, switched from JSUnitt to envjs, and are now using a hybrid approach I’ll describe in detail.

Some of the issues we wanted to address with our testing tools were:

  • How easy is it to run the tests?
  • How easy is it to debug the tests?
  • How easy is it to integrate the tests into our existing continuous integration environment

Most of the tools we used easily met the first two logistical issues, but the last one was not as simple.

The following describes an approach that meets all of the above list (after the jump).

(Continued)

Revert to Console for IM – Gtalk Example using Mcabber

I can finally sleep at night now that I have a command-line solution for Google Talk.

What’s needed (for a poor windows user):

If cygwin and ssh are new to you, read this to get up to speed.

If you are setting up mcabber on a host machine, you’ll want to setup ssh as a service or daemon on that machine as well. Use the ssh-host-config script to do that.

Quickly, here’s how to get going.

  1. Get the latest updates for cygwin using the cygwin setup program. I was missing the latest glib and I didn’t have pkg-config.
  2. Download the mcabber source from the website. Run the configure script with no arguments. Take note of any errors; they are most likely related to missing libraries. Get these libraries with the cygwin setup program.
  3. Once configure is successful, you should be able to run make, and then make install with no problems.
  4. Create a mcabberrc file in the directory ~/.mcabber, note that the filename is “mcabberrc” and not “.mcabberrc”.
  5. Put the following into the mcabberrc file to configure it for Google Talk.

set username = <your username at gmail dot com>
set server = talk.google.com
set ssl = 1
set ssl_verify = 0
set port = 5223

That’s all there is to it. Type mcabber and it should prompt you for your password and then connect.

You’ll see 3 different “panes” or frames and the command prompt at the bottom. Scroll through your contacts with Page Up and Page Down. When you’ve selected a contact, just start typing in the command prompt to send messages. The program commands start with a “/” character, type “man mcabber” for a complete list of commands. If you’re in mcabber, you can type “/help” for help on specific mcabber commands.

That’s all for now!

-eokuwwy

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

The best 59$, a java developer can ever invest

If you don’t buy this now, you’re either dumb. Or just plainly stupid.

For the impatient: it’s a small jar that lets you compile/run/deploy java instantly, like php. I’ts the real HOT DEPLOY that jvm lacks out of the box.

No more restarting the server, ever again, even after reconfiguring Spring beans.

I used this for a month, and convinced my manager to buy licenses for all. It’s that good.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Basic Pine Gmail Config

I always forget this, and periodically find myself setting up a new pine client. So rather than digging around on the web each time, I’m adding my notes here:

Create a .pinerc file, maybe a custom one for gmail like .gmailpinerc

POP3

smtp-server=smtp.gmail.com/user=user@gmail.com/ssl

inbox-path={pop.gmail.com/pop3/ssl/user=user@gmail.com}inbox

IMAP

smtp-server=smtp.gmail.com:587/tls/user= user@gmail.com

inbox-path={imap.gmail.com:993/ssl/novalidate-cert/user= user@gmail.com}inbox

There are a host of other options that can be configured, but this is a good start.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Unit Testing JavaScript with HtmlUnit and Screw.Unit

Writing apps with today's rich client libraries such as Extjs , YUI , and JQuery really shows how much potential is still left in web development. But it takes a lot of code, and the amount of technical debt can get heavy, quickly. Good tests can help reduce this technical debt, and there are a lot of testing tools available for the client. Today though, I want to go beyond just using a tool, and talk more about integrating your JavaScript tests into an existing Continuous Integration environment. 

I have a confession to make- I hate running tests manually. I'll write tests when I'm doing new development or bug fixing, but I hate running them after I've fixed the bug or implemented the code. That's why we have CI environments, right? So I don't have to run the stupid tests each time! There are enough ridiculous rules put in place in corporate work environments today already, I don't like adding tasks that can be automated into the mix.
Here's what I've come up with for integrating my JavaScript Unit Tests:
  1. Write tests with Screw.Unit . Why Screw.Unit? I like the simple DOM it creates. I like the code behind it- specifically the separation of builders and matchers. It's relatively easy to debug my code in Firebug. But mostly, it's because it's of the easy DOM it displays. There's nothing magical about Screw.Unit. It's just a simple tool. But that's the point.
  2. Use HtmlUnit to execute Screw.Unit tests, and inspect the results. HtmlUnit has the best JavaScript framework support in the Java world today. It uses Rhino to execute JavaScript and has written very comprehensive DOM support on top of that. It can handle most major JS framework code. So I execute my tests with HtmlUnit, and then inspect the simple DOM results. Easy!
  3. I use a Parameterized JunitTest to read through all of my ScrewUnit tests (*.html files), and execute a JUnit test for each. 
Done! Simple integration at it's best.

Posted via email

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Developing Grails Apps in Eclipse

This was a post I was planning on linking to; a colleague of mine was going to write a post about it, but he hasn’t yet and I’ve just spent an extra hour trying to get this to work and am frustrated- and so here is the post you’ve all been waiting for.

There are lots of holes in the existing documentation about setting up eclipse to work with grails.

First off, you will want to generate groovy class files to a directory, like bin-groovy. It’s not just for debugging, it’s also for running unit tests. Running unit tests from eclipse is a lot faster than running them from the command line, because eclipse will generate the class files needed as you develop. It’s really nice to have.

Here’s where the fun starts- let’s assume you want to use a plugin. It’s a reasonable assumption, since there are so many cool plugins available. The first thing you need to know is where plugins download and install to. These go to a plugin directory in your .grails directory, which is normally in your home folder. You’ll need the jars from these plugins in your eclipse classpath, so you’ll need to unzip them and add them as external jars. Then, you’ll also need the source from those plugins in your classpath. For this, I added an External Class Folder to my Java Build Path- the folder was located in .grails/projects//classes.

While you’ll want to uncheck the Disable Groovy Compiler Generating Class File checkbox, you’ll want to enable the Disable Check Package Matches Source Directory, otherwise you’ll have a compiler error from resources.groovy.

Finally, add bin-groovy as a class folder to your java build path libraries tab.

This entry was a big help.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]