joakim.erdfelt.com
... (new Random()).nextThought() ...
Quicksearch
Syndicate This Blog
Blog Administration
Blog License
Links
Statistics
Top Referrers
www..super.info (1)
www.google.com (1)
www.google.fi (1)
www.google.no (1)
www.google.pl (1)
Maven is like Chickenpox
So here I am, working on an expression bug in Apache Archiva, when I notice that one of my twitter tracks on "maven" got a hit.
Since I work with maven regularly, and thoroughly enjoy it. I decided to see how persistent therealadam is about disliking maven.
Hmm, not a pleasant experience his group is having...
Well ... it's not the first time I've read or heard negative thoughts about maven.
So I left it alone and went to get a fresh glass of water. When I reached the kitchen, it hit me. Maven is like Chickenpox. Yes, you heard me right, Chickenpox. Lemme see if I can explain.
- It starts out with bodily sores.
- It is highly contagious.
- Tends to cause itching in early stages.
- Medication doesn't help.
- Symptoms rarely reappear.
- Young developers catch it and don't think twice about it.
- Catching it when you are older can be dangerous.
- You can suffer greatly if you catch it when you are old.
- Older developers that have caught it when they were young, make sure that their young ones catch it when they are young.
- Once caught, you have chicken pox for life.
no comments yet, be the first! Trackbacks (0)
Must have Thunderbird Extensions for the Open Source Developer
Being an developer on one or more popular open source project can really make your email experience quite unique. Having, or even discussing, add-ons for Thunderbird is even more unique.
I've collected a few Thunderbird extensions that I consider essential, and have made my email experience more streamlined. I want to share them with my fellow open source developers that have yet to be seduced to the dark side email client known as mail.app
Here's what my email message view looks like right now
Mnehy

by Karsten "Mnyromyr" Düsterloh
This extension falls into the nebulous 'jack of all trades' category. It does a lot of stuff with the header view and the context menus within an email message.
Some of listed features I find useful:
- Custom Headers and X-Faces
- Mnenhy allows to alter the set of header lines shown of an e-mail or usenet posting and their respective method of display.
Configuration Screen for Email Headers.
The header expand button has been ... uh ... expanded to have more options on how you want to view the headers. - Folder Storage
- Mnenhy provides a mechanism to store the thread pane column layout and preferences dependent upon the currently selected folder. For example, you can hide the junk state in the newsgroup de.test, but show it in your Inbox or activate HTML for RSS feeds only.
- Text Codecs
- Mnenhy adds two new context menu items for encoding/decoding text to the mail editor, the mail display, the browser, the source view and Chatzilla. Available codecs are currently ROT-13, Base64, UUEncode/UUDecode, encodeURI/decodeURI and similar, Unicode/number representation, Kenny-Speak, 1337-Speak, Morse, Reverse, toUpperCase, toLowerCase and the evaluation of selections.
The Encoder / Decoder options for highlighted text. - Junk Filter Tools
- - Unknown Junk State Icon Mnenhy resurrects the 'unknown' state icon for junk filtered mail.
Display Mailing List Header

Pretty simple add-on that adds a new condensed row, with hyperlinks to the common mailing list functions advertised within the email header.
Colored Diffs

Take the boring and often hard to read commit messages and diffs that arrive in email and colorize them.

TIP: Here's a tip on installing add-ons within thunderbird. Drag and Drop it from Firefox.
- Open up Thunderbird, and goto the Tools / Add-Ons menu option. This should have started the following dialog box.
- Now open up https://addons.mozilla.org/en-US/thunderbird/ in firefox.
- Browse around in firefox till you find an extension that you like.
- Drag and Drop the Green "Install Now" button onto the Thunderbird Add-On's window (that you started and left open in step #1) to start the installation process.
Graphs / The Maven Universe
Just thought I'd let you know what the Maven Universe looks like in graph form.
All 221 modules. (no sandbox or test modules included)
All 221 Maven Modules
All 221 Maven Modules / Transitive Reduced
no comments yet, be the first! Trackbacks (0)
Maven Graphing - Multimodule Progress
This is just an update some exciting work I've been doing for the maven project.
Graphs about your Maven projects.
See dev@maven.apache.org mailing list topic: [m2] Adding further dependency goals
I'm working on adding several graphs. a) Single Project Dependencies - True / Complete / Simple View b) Single Project Dependencies - True / Grouped / Clustered by GroupID c) Single Project Dependencies - True / Transitive Reduced d) Single Project Dependencies - Resolved e) Multi Module - True / Only Modules / Simple View f) Multi Module - True / Only Modules / Transitive Reduced g) Multi Module - True / Complete / With Dependencies i) Multi Module - True / Complete / With Dependencies / Transitive Reduced j) Multi Module - True / Complete / With Dependencies / Grouped / Clustered by GroupID k) Multi Module - Resolved / With DependenciesHere's some examples of my current progress with graphs e and f ...
Maven 2.1 Trunk - Only Modules / Simple View
Maven 2.1 Trunk - Only Modules / Transitive Reduced
Continuum Trunk - Only Modules / Simple View
Continuum Trunk - Only Modules / Transitive Reduced
Archiva Trunk - Only Modules / Simple View
Archiva Trunk - Only Modules / Transitive Reduced
These graphs have been created by a maven plugin that is in the works, it utilizes the plexus-graphing libraries (subversion repository can be found at https://svn.codehaus.org/plexus/plexus-sandbox/trunk/plexus-components/plexus-graphing/ ) to produce the above images. The plexus-graphing library has support for multiple providers (such as graphviz and prefuse).
I'll update this blog as this plugin begins to take on more features.
Adding watermarks with ImageMagick
Want to watermark your images in an automated fashion using command line tools?
The Technique
Prerequirements:
- Unix: Use of a POSIX compatible Unix is required. Linux, OSX, FreeBSD, etc... are all good. If you are windows user, go install a copy of Cygwin, it's a POSIX compatibility layer on top of windows.
- Bash Shell: If you have Unix, you most likely have Bash already.
- ImageMagick: Install a copy of the ImageMagick tools, using your favorite installer (yum, apt, rpm, deb, tarball, source, etc...)
Start with by creating a PNG image with alpha channel that represents the overlay that you want.
watermark.png (219x42)
Use the composite tool from ImageMagick to apply the watermark.png image onto the original image to produce the desired effect.
$ composite -gravity SouthEast watermark.png original-image.png output-image.png
How to take a directory full of PNG files and add a copymark to each.
for PNG in *.png
do
echo Adding watermark to $PNG
composite -gravity SouthEast watermark.png $PNG ${PNG//.png}-watermarked.png
done
no comments yet, be the first! Trackback (1)
Creating a Maven Repository Explorer View
How would you like an Icon in Windows that will pop up an explorer window that shows only the maven repository and nothing else?
An icon that shows you this ...
Simple. Create a new shortcut on your desktop with the following for the "Location of the item."
%windir%\explorer.exe /n,/e,/root,%userprofile%\.m2\repository\
All done.
no comments yet, be the first! Trackbacks (0)
Adding Copyright with netpbm
Lets say you have a set of images that you want to add to your website, but you want to make sure that each one has copyright visible and attached to the image. But you want it to be consistent, and not have to pull each one into Gimp or Photoshop in order to add that copyright text. Here's what you do.
The Script
These instructions require a knowledge of Bash and Unix.
A bash shell script has been prepared to help you with the addition of copyright text to your image.
Prerequirements:
- Unix: Use of a POSIX compatible Unix is required. Linux, OSX, FreeBSD, etc... are all good. If you are windows user, go install a copy of Cygwin, it's a POSIX compatibility layer on top of windows.
- Bash Shell: If you have Unix, you most likely have Bash already.
- Netpbm: Install a copy of the netpbm tools, using your favorite installer (yum, apt, rpm, deb, tarball, source, etc...)
This pnmcopymark.sh bash shell script.
#!/bin/bash
TEMPDIR=".pnmcopymark"
if [ ! -d "$TEMPDIR" ] ; then
mkdir -p $TEMPDIR
fi
function pnmWidth() {
PNM=$1
pamfile $PNM | \
sed -e "s/^.* \([0-9][0-9]*\) by [0-9][0-9]* .*$/\1/g"
}
function pnmHeight() {
PNM=$1
pamfile $PNM | \
sed -e "s/^.* [0-9][0-9]* by \([0-9][0-9]*\) .*$/\1/g"
}
function pnmAddCopyMark() {
PNM=$1
BGCOLOR="#ffffff"
CMPNM="copymark-text.pnm"
let pnmWidth=`pnmWidth "$PNM"`
let cmWidth=`pnmWidth "$CMPNM"`
let cmHeight=`pnmHeight "$CMPNM"`
ppmmake "$BGCOLOR" $pnmWidth $cmHeight > $TEMPDIR/wide_blank.pnm
if [ $pnmWidth -lt $cmWidth ] ; then
pnmscale -width $pnmWidth "$CMPNM" > $TEMPDIR/scaled_text.pnm
cp $TEMPDIR/scaled_text.pnm $TEMPDIR/text.pnm
else
cp "$CMPNM" $TEMPDIR/text.pnm
fi
pnmpaste -replace $TEMPDIR/text.pnm 0 0 $TEMPDIR/wide_blank.pnm > \
$TEMPDIR/wide_text.pnm
pnmcat -topbottom "$PNM" $TEMPDIR/wide_text.pnm > \
$TEMPDIR/result.pnm
cp $TEMPDIR/result.pnm $PNM
}
PNMT="$TEMPDIR/temp.pnm"
if [ -z "$1" ]; then
pnmtopnm > $PNMT
else
cp $1 $PNMT
fi
pnmAddCopyMark "$PNMT"
pnmtopnm "$PNMT"
rm -rf $TEMPDIR
Executing the Script
Create your copyright text image. In your image editor (Gimp, Photoshop, etc...) create a small sliver of an image that has your copyright text in it. (Only need to do this once!)
copymark-text.png (348x17)
Convert your copymark-text.png image to a PNM file so that netpbm and the script can use it. (Only need to do this once!)
To execute the pnmcopymark.sh script you have to do it the netpbm way, which is to first convert the original image into the PNM format (netpbm internal image format) so it can be piped thru the other tools and scripts before eventually being converted back into the output format you desire.
$ pngtoppm copymark-text.png > copymark-text.pnm
How to take a PNG file and add a copymark to it.
$ pngtopnm flower-red-bold.png | ./pnmcopymark.sh | \
pnmtopng -compression=9 > flower-red-bold-with-copymark.png
How to take a directory full of PNG files and add a copymark to each.
for PNG in *.png
do
echo Adding copymark to $PNG
pngtopnm $PNG | ./pnmcopymark.sh | \
pnmtopng -compression=9 > ${PNG//.png}-with-copymark.png
done
Continue reading "Adding Copyright with netpbm"
no comments yet, be the first! Trackbacks (0)
Creating Drop Shadows with netpbm
Lets say you have a set of images that you want to add to your website, but you want to make sure that each one has a drop shadow. But you want it to be consistent, and not have to pull each one into Gimp or Photoshop in order to add that drop shadow. Here's what you do.
The Script
These instructions require a knowledge of Bash and Unix.
A bash shell script has been prepared to help you with the creation of the drop shadow.
Prerequirements:
- Unix: Use of a POSIX compatible Unix is required. Linux, OSX, FreeBSD, etc... are all good. If you are windows user, go install a copy of Cygwin, it's a POSIX compatibility layer on top of windows.
- Bash Shell: If you have Unix, you most likely have Bash already.
- Netpbm: Install a copy of the netpbm tools, using your favorite installer (yum, apt, rpm, deb, tarball, source, etc...)
This pnmdropshadow.sh bash shell script.
#!/bin/bash
TEMPDIR=".pnmdropshadow"
if [ ! -d "$TEMPDIR" ] ; then
mkdir -p $TEMPDIR
fi
function pnmWidth() {
PNM=$1
pamfile $PNM | \
sed -e "s/^.* \([0-9][0-9]*\) by [0-9][0-9]* .*$/\1/g"
}
function pnmHeight() {
PNM=$1
pamfile $PNM | \
sed -e "s/^.* [0-9][0-9]* by \([0-9][0-9]*\) .*$/\1/g"
}
function pnmBorder() {
PNM=$1
COLOR="#555555"
# Add Border to PNM
pnmmargin -color "$COLOR" 1 $PNM > $TEMPDIR/with_border.pnm
cp $TEMPDIR/with_border.pnm $PNM
}
function createConvolMap() {
let blurSize=$1;
if [ `expr $blurSize % 2` -eq 0 ] ; then
let blurSize=$blurSize+1;
fi
let offset=$blurSize*$blurSize;
let rowvalue=$offset+1;
let offset=$offset*2;
echo "P2"
echo "$blurSize $blurSize"
echo "$offset"
for (( y=0; y<$blurSize; y++))
do
for (( x=0; x<$blurSize; x++))
do
echo -n "$rowvalue"
if [ $x -ne $blurSize ]
then
echo -n " "
fi
done
echo ""
done
}
function pnmDropShadow() {
PNM=$1
BGCOLOR="#ffffff"
SHADOWCOLOR="#888888"
let shadowOffset=4;
let shadowBlur=5;
let leftPad=$shadowBlur-$shadowOffset;
if [ $leftPad -lt 0 ] ; then
let leftPad=0;
fi
let rightPad=$shadowBlur+$shadowOffset;
if [ $rightPad -lt 0 ] ; then
let rightPad=0;
fi
let topPad=$shadowBlur-$shadowOffset;
if [ $topPad -lt 0 ] ; then
let topPad=0;
fi
let bottomPad=$shadowBlur+$shadowOffset;
if [ $bottomPad -lt 0 ] ; then
let bottomPad=0;
fi
let pnmWidth=`pnmWidth "$PNM"`
let pnmHeight=`pnmHeight "$PNM"`
let shadowWidth=$pnmWidth+$leftPad+$rightPad;
let shadowHeight=$pnmHeight+$topPad+$bottomPad;
# Create the shadow background
ppmmake "$BGCOLOR" $shadowWidth $shadowHeight > \
$TEMPDIR/shadow_background.pnm
# Create the mask block
ppmmake "$SHADOWCOLOR" $pnmWidth $pnmHeight > \
$TEMPDIR/shadow_mask.pnm
# Insert mask block into the background block
pnmpaste -replace \
$TEMPDIR/shadow_mask.pnm \
$shadowOffset $shadowOffset \
$TEMPDIR/shadow_background.pnm > \
$TEMPDIR/shadow_paste.pnm
# Create Convolution Matrix File
createConvolMap "$shadowBlur" > $TEMPDIR/shadow.cnv
# Blur the shadow
pnmconvol \
$TEMPDIR/shadow.cnv \
$TEMPDIR/shadow_paste.pnm > \
$TEMPDIR/shadow_blur.pnm
# Put original image into blur
pnmpaste -replace $PNM \
$leftPad $topPad $TEMPDIR/shadow_blur.pnm > \
$TEMPDIR/with_shadow.pnm
cp $TEMPDIR/with_shadow.pnm $PNM
}
PNMT="$TEMPDIR/temp.pnm"
if [ -z "$1" ]; then
pnmtopnm > $PNMT
else
cp $1 $PNMT
fi
pnmBorder "$PNMT"
pnmDropShadow "$PNMT"
pnmtopnm "$PNMT"
rm -rf $TEMPDIR
Executing the Script
To execute the pnmdropshadow.sh script you have to do it the netpbm way, which is to first convert the original image into the PNM format (netpbm internal image format) so it can be piped thru the other tools and scripts before eventually being converted back into the output format you desire.
How to take a PNG file and add a dropshadow to it.
$ pngtopnm flower-pink.png | ./pnmdropshadow.sh | \
pnmtopng -compression=9 > flower-pink-with-shadow.png
How to take a directory full of PNG files and add a dropshadow to each.
for PNG in *.png
do
echo Adding drop shadow to $PNG
pngtopnm $PNG | ./pnmdropshadow.sh | \
pnmtopng -compression=9 > ${PNG//.png}-with-shadow.png
done
Continue reading "Creating Drop Shadows with netpbm"
no comments yet, be the first! Trackbacks (0)
Geek License (Plates)
Found a few geek license plates out in California (shock!).
Enjoy ...





