Archive for category Technology
Woo Hoo! WordPress 3.0 is here!
Posted by ekrunch in Technology, Useful Information, Videos on June 17, 2010
Check this thing out! Congrats to the WordPress team on making what i’m sure will be another amazing release. Seeing this video reminds me of why I’m using WordPress and why I’ve been using it since the 1.x days. It was great software then, it’s amazing software now, 3.0 looks to raise the bar yet again! (Just when you didn’t think they could get any more features into this thing… SURPRISE!) And now on to the video…
It’s time to Swype!
Posted by ekrunch in Technology on June 7, 2010
Okay, for the first time in a while, i’m excited about a new technology. Swype looks absolutely amazing. I’m about to take the Android leap and go to a 100% touchscreen phone and i’ve been dreading the messaging part. Looks like my prayers have been answered and somebody has finally invented a better way. As a matter of fact, it was one of the guys who helped to invent T9 word mode, which is absolutely the best way to text on a regular number pad phone!
Check out these videos on the Swype site. Absolutely incredible. I can’t wait to get a copy for my Android phone.
iTunes Cover Art extraction script for Windows
Posted by ekrunch in Technology on May 16, 2010
I’ve recently started using iTunes to organize my music library, but I use TVersity and WMP (via UPnP A/V) to play it back. I needed a way to export iTunes cover artwork to Folder.jpg so WMP & TVersity could pick it up. After digging around for a while, I couldn’t really find a solution so I broke open my text editor and put together a little something to do the job. It’s a JavaScript file that uses the iTunes COM object.
As far as I know, iTunes must be running for this to work and I think you need to have your entire music library open for it to see all files. I’m not 100% sure about that, but just do it anyway.
Note: Please consolidate and organize your music library first. This script puts the Folder.jpg in the same folder as the track itself, so if you’ve got tracks scattered everywhere, you’re going to have a lot of Folder.jpg files everywhere.
Download this script here
The following is the contents of the script for those who just want to see the code and derive their own works.
/* File: ExportItunesArtwork.js Version: 1.0 Copyright © 2010 Edward Presutti (intellidick.com), All Rights Reserved */ /* iTunes delcarations */ var ITTrackKindFile = 1; var ITArtworkFormatUnknown = 0; var ITArtworkFormatJPEG = 1; var ITArtworkFormatPNG = 2; var ITArtworkFormatBMP = 3; var iTunesApp = WScript.CreateObject("iTunes.Application"); var mainLibrary = iTunesApp.LibraryPlaylist; var tracks = mainLibrary.Tracks; var numTracks = tracks.Count; var fso = WScript.CreateObject("Scripting.FileSystemObject"); while (numTracks != 0) { var currTrack = tracks.Item(numTracks); // is this a file track? if (currTrack.Kind == ITTrackKindFile) { // yes, does it have an empty location? if (currTrack.Location != "") { // no, let's get some artwork var artwork = currTrack.Artwork; var numArt = artwork.Count; while (numArt != 0) { var art = artwork.Item(numArt); // WScript.Echo("Album : " + currTrack.Album + ", Artwork Description : " + art.Description); var f = fso.GetFile(currTrack.Location); // WScript.Echo("Path : " + f.ParentFolder); var extension; switch (art.Format) { case ITArtworkFormatJPEG: extension = ".jpg"; break; case ITArtworkFormatPNG: extension = ".png"; break; case ITArtworkFormatBMP: extension = ".bmp"; break; } if (art.Format != ITArtworkFormatUnknown) { var fname = f.ParentFolder + "\\" + "Folder" + extension; if (!(fso.FileExists(fname))) { WScript.Echo("Saving artwork : " + fname); art.SaveArtworkToFile(fname); } } numArt--; } } } numTracks--; }
Krunchy’s 4TW tips for email server management.
Posted by ekrunch in Rants, Technology on April 29, 2010
While conversing with my friend over at dopplercow.com, we got into a discussion about how companies allow their users to have HUGE email boxes and other stupid behavioral patterns that they allow. It’s amazing how out of hand email has become. What started as a joke has now become a blog post, here’s some quick tips on how to successfully manage your email servers.
- Stop using email for attachments. Collaborative Document Suites 4TW
- Stop CHATTING in email. Instant Messaging 4TW
- Stop being an idiot and delete your old mail. Cleanliness 4TW
With the addendum from Chris over at Dopplercow
Allow IT to implement mail quotas.
I’ll add my 0.02 to that and say
- Allow IT to implement mail quotas. Good IT Practices 4TW
Hey Nikon! Thanks for nothing!
Posted by ekrunch in Rants, Technology on November 30, 2009
Looks like Nikon put out that update for the NEF Codec that I was asking for.
It officially supports W7 now, even though the 1.8.0 release worked from what I read. Still no 64-bit support for Vista / W7. So hey, thanks for nothing!
Seriously though… what’s the hold up? Are you using some 3rd party library in your code that’s not available in 64-bit or are you just too cheap and/or lazy to upgrade your development tools? Come on now, 64-bit Windows is coming. Almost all new servers are 64-bit and a significant portion of Windows 7 installations will be 64-bit. Get with the program already! NEF Codec 2.0 needs to get here and it needs to be 64-bit.
Network neutrality, are you ready for the internet without it?
Posted by ekrunch in Technology on November 21, 2009
A friend of mine over at The Systems Engineer sent me a disturbing image and I thought i’d pass it on. This is just a taste of what the internet might be like if certain people have their way. All I can say is that if you don’t know what this is about, you should pay more attention to what your government is doing …
Ready or not world… 64-bit Windows is coming!
Posted by ekrunch in Technology on October 24, 2009
Looks like 64-bit is finally going to get a decent launch for the desktop windows world. Let’s face it, Vista 64-bit didn’t go over too well. Software vendors just weren’t ready for it. I was just browsing Dell’s site and it seems that all of the new Windows 7 based installations will be 64-bit. Looks like the boys in Round Rock are going full speed ahead. This validates an article I read months ago saying that Microsoft was going to push OEMs to package 64-bit copies of Windows 7. Hopefully other vendors will follow suit and we can start down the path to more 64-bit software for the desktop PC. Although the only real benefit for most users is the higher maximum memory, it’s still nice to see the industry FINALLY progressing. (*nix systems have been 64-bit for YEARS now) It’s also nice that as 64-bit software matures, those of us who have been running it for the past few years can finally get some real 64-bit performance tuning from our application vendors. All I can say is that I hope software vendors who have been holding out on 64-bit get a clue pretty quick! Those new Dells are shipping and nothing pisses off John Q User faster than some vendor telling him that he doesn’t need 64-bit support… even if the vendor is right.
Oh and Nikon, please fix the damned NEF Codec to run with 64-bit operating systems… it’s really not that hard. Upgrade your development tools and just do it please. We Nikon D-SLR users pay a lot of our cameras and do so willingly knowing that Nikon makes some of the best products in the industry. Show us a little love and support 64-bit operating systems.
Not cuil guys, not cuil at all…
Posted by ekrunch in Rants, Technology on May 29, 2009
Here I sit, broken hearted… my photo gallery is down. I happened to click the link this morning and the gallery was down with a 500 internal server error. I hit the logs and what do I see, i’m being spidered and it’s beating my web server down. There’s a new search engine on the block called Cuil (pronounced ‘cool’), and apparently it’s not very nice to the small web server owner. They advertise themselves and brag about how many pages they crawl and such… well, thanks for killing my damned web server jackasses. Your mega crawler just blasted my web server into oblivion. Now I have a robots.txt in place and hopefully that will shut this crap down. Funny, i’ve never had problems with Googlebot or any other search engine’s crawler until now.
Another fun day on the web.
Prolific USB to Serial Adapters
Posted by ekrunch in Rants, Technology on April 30, 2009
What’s the deal with these things? It seems like no matter how hard I try, I can never get one to actually work with the device that i’m using. I’ve successfully managed to make it work with an old serial swipe card reader, but that’s about it!
It also seems like completely uninstalling the Windows drivers is an impossibility. I have three different USB to Serial adapters, all made by different vendors, all using the same Prolific PL2303 chipset. The installed drivers work for ONE of them. No amount of deleting ghosted devices or clearing USB IDs out of the registry can make the other two work correctly. I’ve even tried forcing them onto the older versions of the drivers with no luck. It’s just disaster after disaster with these things, yet it seems like everyone is using this same chip set.
Yet another piece of terrible driver software accompanied by bad hardware. Any recommendations for a good USB to Serial adapter would certainly be appreciated! If anyone is into the aquarium scene and has used one with an Aquatronica controller, that would be even more helpful. Sad irony, Aquatronica sells a PL2303 based USB to Serial adapter and i’d say success rates are abysmal. I see LOTS of people complaining about them not working. At least i’m not alone!
Adobe Flex, BlazeDS, and TIBCO EMS
Posted by ekrunch in Technology, Useful Information on March 22, 2009
I’ve searched high and low and can’t really find a good walk through on how to configure TIBCO EMS and BlazeDS. The documentation can also be a little gray on how to correctly use the JMS adapter so i’ve taken the liberty of putting together this little pictorial on how it’s done.
First things first, get yourself a fresh copy of Eclipse. For this setup, I used Eclipse Ganymede (3.4, J2EE Edition) on Windows. You’ll need the Java stuff in addition to Flex Builder because we’re going to launch our own tomcat inside of Eclipse instead of using BlazeDS Turnkey or any of those. Also, if you want to add in Java remoting later you’ll appreciate having the components already there.
Next, install the Flex plugin for Eclipse and update according. I downloaded and installed the Flex 3.3 SDK and changed my default SDK in the preferences. Once the eclipse platform is installed, updated, and configured the way you like it, let’s make a new project.
Note: Click any one of these images for the full size version.
Step 9 - Connect the project to your Tomcat server and select the blazeds.war that you downloaded from Adobe
First, let’s edit web.xml. This file should be okay out of the box. Here’s mine as a reference.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>blaze1</display-name> <context-param> <param-name>flex.class.path</param-name> <param-value>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars</param-value> </context-param> <!-- Http Flex Session attribute and binding listener support --> <listener> <listener-class>flex.messaging.HttpFlexSession</listener-class> </listener> <!-- MessageBroker Servlet --> <servlet> <servlet-name>MessageBrokerServlet</servlet-name> <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class> <init-param> <param-name>services.configuration.file</param-name> <param-value>/WEB-INF/flex/services-config.xml</param-value> </init-param> <init-param> <param-name>flex.write.path</param-name> <param-value>/WEB-INF/flex</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>MessageBrokerServlet</servlet-name> <url-pattern>/messagebroker/*</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <!-- for WebSphere deployment, please uncomment --> <!-- <resource-ref> <description>Flex Messaging WorkManager</description> <res-ref-name>wm/MessagingWorkManager</res-ref-name> <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> --> </web-app> |
Now let’s edit services-config.xml. Key things to note here is that i’ve disabled the inclusion of the remoting-config.xml and the proxy-config.xml since i’m not using them. I’ve also changed the default AMF channel from “my-amf” to “AmfChannel1″ and updated the endpoint URL. Everything else is pretty much the same.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | <?xml version="1.0" encoding="UTF-8"?> <services-config> <services> <!-- <service-include file-path="remoting-config.xml" /> <service-include file-path="proxy-config.xml" /> --> <service-include file-path="messaging-config.xml" /> </services> <security> <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/> <!-- Uncomment the correct app server <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"> <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/> <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/> <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/> --> <!-- <security-constraint id="basic-read-access"> <auth-method>Basic</auth-method> <roles> <role>guests</role> <role>accountants</role> <role>employees</role> <role>managers</role> </roles> </security-constraint> --> </security> <channels> <channel-definition id="AmfChannel1" class="mx.messaging.channels.AMFChannel"> <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/AmfChannel1" class="flex.messaging.endpoints.AMFEndpoint"/> </channel-definition> </channels> <logging> <target class="flex.messaging.log.ConsoleTarget" level="Error"> <properties> <prefix>[BlazeDS] </prefix> <includeDate>false</includeDate> <includeTime>false</includeTime> <includeLevel>false</includeLevel> <includeCategory>false</includeCategory> </properties> <filters> <pattern>Endpoint.*</pattern> <pattern>Service.*</pattern> <pattern>Configuration</pattern> </filters> </target> </logging> <system> <redeploy> <enabled>false</enabled> <!-- <watch-interval>20</watch-interval> <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file> <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file> <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file> <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file> <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file> <touch-file>{context.root}/WEB-INF/web.xml</touch-file> --> </redeploy> </system> </services-config> |
And last but not least, messaging-config.xml. This file is where the JMS connection is made to the TIBCO EMS server. And no, you do not have to put anything in context.xml when you’re doing it this way.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | <?xml version="1.0" encoding="UTF-8"?> <service id="message-service" class="flex.messaging.services.MessageService"> <adapters> <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" /> <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/> </adapters> <default-channels> <channel ref="AmfChannel1"/> </default-channels> <destination id="jmsDest1"> <properties> <jms> <!-- topic/queue --> <destination-type>topic</destination-type> <!-- What type of message we expect --> <message-type>javax.jms.TextMessage</message-type> <!-- This is the JNDI name of the topic/queue connection factory on the server --> <connection-factory>TopicConnectionFactory</connection-factory> <!-- This is the JNDI name of the topic/queue on the server --> <destination-jndi-name>testTopic</destination-jndi-name> <!-- Keep JMS headers when the message is delivered to Flex --> <preserve-jms-headers>true</preserve-jms-headers> <!-- If we're producing on this destination, what parameters should be used --> <delivery-mode>NON_PERSISTENT</delivery-mode> <message-priority>DEFAULT_PRIORITY</message-priority> <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode> <!-- The following lines are for the JNDI connection --> <initial-context-environment> <property> <name>Context.INITIAL_CONTEXT_FACTORY</name> <value>com.tibco.tibjms.naming.TibjmsInitialContextFactory</value> </property> <property> <name>Context.PROVIDER_URL</name> <value>tcp://localhost:7222</value> </property> <property> <name>Context.SECURITY_PRINCIPAL</name> <value>admin</value> </property> <!-- Uncomment if you have a password <property> <name>Context.SECURITY_CREDENTIALS</name> <value>password</value> </property> --> </initial-context-environment> </jms> </properties> <channels> <channel ref="AmfChannel1"/> </channels> <adapter ref="jms"/> </destination> </service> |
Now we have our Tomcat instance set up, time to import some class libraries.

Step 15 - Select the TIBCO EMS 5.x library directory and select all of the .jar files (There are more than what is pictured here)

Step 18 - Click the Servers tab that appeared at the bottom, highlight the Tomcat Server and click the Debug icon
Now jump back into Eclipse and set up the application. I started with a base form, added a text area and called it a day. Here’s the code to add in the message consumer, channel configuration, and event handlers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" applicationComplete="messageConsumer.subscribe()"> <mx:Script> <![CDATA[ // Import the required namespaces import mx.messaging.events.MessageEvent; import mx.messaging.events.ChannelEvent; import mx.messaging.messages.AsyncMessage; private function incomingMessageHandler(event:MessageEvent):void { logArea.text += (event.message.body + "\r"); } private function connectEventHandler(event:ChannelEvent):void { logArea.text += (event.channel.endpoint + " is now connected.\r"); } private function disconnectEventHandler(event:ChannelEvent):void { logArea.text += (event.channel.endpoint + " is now disconnected.\r"); } ]]> </mx:Script> <mx:TextArea id="logArea" editable="false" width="95%" height="95%"/> <mx:Consumer id="messageConsumer" destination="jmsDest1" message="incomingMessageHandler(event)" channelConnect="connectEventHandler(event)" channelDisconnect="disconnectEventHandler(event)"> <mx:channelSet> <mx:ChannelSet> <mx:channels> <mx:AMFChannel url="http://localhost:8080/blaze1/messagebroker/AmfChannel1"/> </mx:channels> </mx:ChannelSet> </mx:channelSet> </mx:Consumer> </mx:Application> |
That should do it for the code work … now for the fun stuff.

Step 26 - If everything worked, you should now be staring at the application and should have a message that the channel has connected.

Step 27 - Now send a text message to the JMS topic using your favorite JMS client and enjoy the result!
That should do it! Enjoy your new found JMS happiness. As a reference, a Channel is what the Flex application uses to communicate with BlazeDS and can be HTTP or AMF. A Destination is where you send the messages to and from. A lot of the examples i’ve found don’t show you how to declare what channel you’re talking to as it’s supposed to be handled automatically, i’ve found this to be unreliable and once I started specifying the channel everything started working flawlessly so i’m staying with it. Also, you can do multiple channels for redundancy and such, but that’s a lesson for another day.
























Recent Comments