Thursday, September 15, 2011

Windows 8 Developer Preview Installation

So Windows 8 developer preview is installed. Go Me

I only had a single issue installing it (miracle I know) and it was with VMWare... It seems that both on my mac and PC that the versions of VMWare I was using 3.1.x and 7.something respectively drops an error. After I paid to update my VMWare, Windows 8 installed like a champ.

So first impressions I like the new 'Start' page... lots of people have said this so nothing new.

I'm not so thrilled about Uncle Bill wanting me to use a Hotmail account to set up an account on the machine. I don't have a Hotmail account so I just went and selected 'set up a local user account' and Bam! I'm cooking with gas.

I think I may have lied about the 'Start' page... but that may be because of my Mac's keyboard...

I've got a some work to do over the next few days so I can dig into VS11 but even on a machine with only 2 gig of RAM seems responsive.

So

Wednesday, July 13, 2011

Stuxnet who done it

Wired has a great article on the evolution of the research into Stuxnet and how it works.

Monday, June 20, 2011

Splunk Rules

It's been a while but I'm a big fan of giving credit where credit is due.

I came across a somewhat entertaining / frustrating bug in Splunk (I wasn't the first, credit goes to I-Man on Splunk Base) that was eating up my FREE license. I posted on Splunk Base and then sent an email to Anna Tant in the sales department at 3PM on Friday afternoon to see if there was anything that could be done. I was honestly expecting to have to reinstall which would have been a 20 - 40 hour ordeal.

At 7 PM I received 4 emails which immediately resolved the issue.

Here is the thanks I sent Anna and the support staff:

Thank you so very much!

I can't begin to tell you how truly impressed I am with the level of support that Splunk provides!

I wasn't really expecting you to be able / willing to do anything until our license purchase order went through. Perhaps too much time working with government-centric vendors that promise the world and deliver far less (and then only months after the check has been cashed) has made me a little jaded.

Your above and beyond assistance (after hours on a Friday afternoon none the less) has turned me into customer for life. I will never hesitate to advocate the use of Splunk as a superior product with unquestionable support.

Thank you once again,

~Richard Hoska

Wednesday, March 26, 2008

Mozilla Firefox 3 Beta 4

So being the early adopter that I am, I ran out the other day and downloaded FF3 and so far I've been very impressed.

The only issue so far is when making very minor changes to websites under development the cache was keeping those updates from being displayed. By changing the cache size to 0 that issue has gone away.

Wednesday, March 12, 2008

Nested Repeaters In Flex 3 using XML

I've been working with .NET for the past few weeks (my latest excuse for not posting but thats a whole another subject...) so I've gotten attached to the idea of nested repeaters for display purposes.

I was looking for a simple example of doing the same if Flex but didn't find one so I figured I would post a little something.

It actually is very simple:

<mx:XML id="myXML" xmlns="">
<root>
<company title="Company 1" code="1">
<office name="Location 1" />
<office name="Location 2" />
<office name="Location 3" />
</company>
<company title="Company 2" code="2">
<office name="Location 1" />
<office name="Location 2" />
</company>
<company title="Company 3" code="3">
<office name="Location 1" />
<office name="Location 2" />
</company>
</root>
</mx:XML>


<mx:VBox width="100%" >

<mx:Repeater id="primaryRepeater" dataProvider="{myXML.company}">
<mx:Label text="{primaryRepeater.currentIndex} - {primaryRepeater.currentItem.@title}"/>

<mx:Repeater id="nestedRepeater" dataProvider="{myXML.company[primaryRepeater.currentIndex].office}">
<mx:Text htmlText=" -- {nestedRepeater.currentItem.@name}" width="75%"/>
</mx:Repeater>

</mx:Repeater>

</mx:VBox>

Flex 3 and Multiline Text

Once again I'm proved an idiot =)

I spent about 45 minutes looking around for a clever way of creating a multi-line label or text block in Flex and was rewarded with a whole lot of nothing...

probably because the solution to the problem is dirt simple, instead of using the label tag with text="yadda yadda" use a text tag with htmlText="yadda yadda" and a set width...

Tuesday, February 19, 2008

Another Problem with CMS?

We had yet another baffling error pop up with Ektron's CMS400.net V7.0.X...

The content blocks displayed as expected until anyone tried to log into the system to make changes. Based on the logs the authentication was fine but the user was presented with the very unhelpful message 'the device is not ready'. This only occurred on our live production machine, the back up (running as a mirrored system) did not suffer the same issue.

I spoke with Ektron and they didn't have anything in their knowledge base, googled the problem and nothing came up.

4 hours of trouble shooting later we discovered a problem with the WSE 3.0 process hanging up. Killing the offending process immediately solved the issue. Long story short, restarting the machine would have been much faster than finding the process... but now its out on the net ... hopefully it will save you the headache.

Best Headline of the Day

With out a doubt the best headline of the day goes to Wired.com for "Raelians Rocket From Clones to Clitorises"

Tuesday, February 12, 2008

Fooling the Ektron CMS400 login.aspx page

This probably will not be of any use outside of our environment but, I'll post it for my own sanity.

When confronted with this error when using a coldfusion form to submit the login.aspx on the Ektron CMS400.net

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that machineKey configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

The first thing to take a look at is the values to the hidden form elements that .net is kind enough to insert for state info and validation. These if these values are hard coded into your cheating login page then you will get the above error. (I would bet that this same issue will pop up anytime someone tries to submit a .net form)

Check __EVENTVALIDATION & __VIEWSTATE field values.

Monday, December 03, 2007

A Response from Ektron

so here is the response I got from Ektron from my question last week...

1. <add key="PdfGenerator" value="http://pdf.ektron.com/pdfgeneratorservice.asmx" /> Creates pdf's from office documents using our free service (thats the one we turned off, external)

2.<add key="MetaDataUpdateTime" value="XX" /> updates metadata, interval time can be set XX (internal)

3. <add key="LoadBalanced" value="X" />
Turning loadbalancing on or off X (internal)

4. <add key="LoadBalServerCount" value="X"/> How many loadbalanced servers are used (internal)

5.<add key="GenerateAutoSummary" value="X"/> Generates an autosummary for your searched items. Can be turned on or off X (internal)

None of these tasks are accessing any outside servers.


Wednesday, November 28, 2007

Ektron Security Vulnerability

I came into the office this morning to find a voice mail and 5 emails from our security officer wanting to know why one of my webservers was sending information to a IP address in Germany. So after cup of coffee and scratching my head for a few minutes we tracked things down.

Starting off with a Reverse DNS Lookup:
217.160.242.233 resolves to
"u15193991.onlinehome-server.com"
Top Level Domain: "onlinehome-server.com"
So looking into the DNS records we got a little more information:
Registrar: SCHLUND+PARTNER AG (explains the Germany connection)
registrant-organization: 1&1 Internet Inc. of Chesterbrook PA

A quick check around the office and no one had any knowledge of us having any dealings with any company in PA.

Using netstat and knowing the IP address (217.160.242.233) we found the following entry. Note that this is VERY intermittent and I ended up running the command for a good 5 minutes before I noticed the IP address:

With the processid we were able to find the offending process (Ektron.ASM.EktronServices20.exe) in the Windows Server process list:

Time for a call to Ektron's customer support number:

After about 30 minutes getting a net meeting set up and recreating the issue we found out that the Ektron.ASM.EktronServices20.exe is a legitimate process and that one (of were not sure yet how many) things it does is to convert MS word documents to PDFs.

You see why this might be a very BAD thing right? You know considering that there isn't a confidentiality agreement with the 'free' service provider and that all communication are in the clear or that we don't yet know everything that the process does... But don't worry Ektron will get back to me with a well documented list >not holding my breath<

The PDF conversion service can be 'turned off' by changing the Enabled attribute in a configuration file located in the C:\Program Files\Ektron\EktronWindowsService20 directory to FALSE:

<EktronServiceConfiguration defaultService="ManageContent">
<serviceProviders>
<add name="PdfFileRead" type="Ektron.ASM.EktronServices.PdfFileManagerRead.PdfFileManagerReadService, Ektron.ASM.EktronServices20" IntervalSeconds="101" Enabled="true" />


It appears that the Ektron service needs to be restarted for the changes to take effect.

Wednesday, October 24, 2007

Creating Account Names

A neat question. One thing to consider is if you have a really large organization you could have 5 'Joe Smith' records so what happens if you run out out of letters in their name?

J_Smith
Jo_Smith
Joe_Smith
???
???

Another is what happens if you have someone with an extremely long last name? A friend of mine has a 15 letter last name.

A lot of organizations have a similar issue and their solution has been to implement the following business rule:
First Letter of First Name + Up to first 7 letters of last name + numeric value (if needed)

So you would end up with something like this:
JSmith
JSmith1
JSmith2

Anyways here is my solution:

<cfparam name="posted" default="FALSE">

<cfif isDefined('form.submit')>
<cfset posted = TRUE>
</cfif>

<cfif posted>

<!--- AS REQUESTED --->

<!--- QUERY YOUR DATABASE TO FIND OUT IF THERE ALREADY IS A USER WITH
A SIMILAR NAME STRUCTURE --->
<cfquery name="getUserName" datasource="#request.dsn#">
SELECT *
FROM EMPLOYEES
WHERE First_Name LIKE '#FORM.FirstName#%'
AND Last_Name = '#FORM.LastName#'
</cfquery>

<!--- CREATE A NEW USER NAME WITHIN THE BOUNDRIES OF THE BUSINESS LOGIC --->
<cfset newUserName2 = left(#FORM.firstName#, #getUserName.RecordCount#) & '_' & left(#FORM.lastName#, 7)>

New User Name: <cfdump var="#newUserName2#"><br>


<!--- RECOMENDED WAY --->

<!--- CREATE A NEW USER NAME WITHIN THE BOUNDRIES OF THE BUSINESS LOGIC --->
<cfset newUserName = left(#FORM.firstName#, 1) & left(#FORM.lastName#, 7)>

<!--- QUERY YOUR DATABASE TO FIND OUT IF THERE ALREADY IS A USER WITH
A SIMILAR NAME STRUCTURE --->
<cfquery name="getUserName" datasource="#request.dsn#">
SELECT *
FROM EMPLOYEES
WHERE First_Name LIKE '#FORM.FirstName#%'
AND Last_Name = '#FORM.LastName#'
</cfquery>

<!--- debugging for your query
<cfdump var="#getUserName#">
--->

<!--- IF THERE ALREADY IS A ACCOUNT NAME THAT MATCHES THE CRITERIA WE HAVE USED
ADD A NUMBER TO THE END OF THE ACCOUNT NAME --->
<cfif getUserName.recordCount GT 0>
<cfset newUserName = newUserName & (getUserName.recordCount + 1)>
</cfif>

<!--- CHECK TO BE SURE THAT THE GENERATED USERNAME DOES NOT CONFLICT WITH
ONE THAT IS ALREADY IN THE SYSTEM --->
<cfquery name="verifyUserName" datasource="#request.dsn#">
SELECT *
FROM EMPLOYEES
WHERE account_name = '#newUserName#'
</cfquery>

<!--- IF THERE IS DROP AN ERROR! --->
<cfif verifyUserName.recordCount GT 0>
<cfabort showerror="there was a problem generating the account name">
</cfif>

New User Name: <cfdump var="#newUserName#">


<cfelse>

<form name="createUser" method="post">
First Name: <input type="text" name="firstName" /><br />
Last Name: <input type="text" name="lastName" /><br />
<input type="submit" name="submit" />

</form>

</cfif>

Grr!!! I Don't Like CFUPDATE and CFINSERT

Heres a response to a question on EE that I see all too often:

Generally it is considered best practice to use booleans (or in MS SQL server bits) to represent active/inactive status and to shy away from using cfupdate and cfinsert.

That said, it sounds as though there is something funky going on in your CF form. your select box should look something like this.

<select name="UsesrActive">                                                                
<option value="Active">Active</option>
<option value="InActive">InActive</option>
</select>


Then your cfupdate tag should look like:

<cfupdate datasource="#request.dsn#"
tablename="Users"
formfields="UsesrActive,YOUR FIELDS">


If your code already looks like this check to make sure that you have all of your fields properly entered into the cfupdate tag.

I really dislike the use of the CFUPDATE and CFINSERT tags. Don't get me wrong they are a great tool/trick for new developers but for anyone who is doing development for a living there really isn't any excuse to use them. And don't get me started on the database design ;)

CFMail Example

It should be pretty simple to use a query to specify which members you want to receive an email.

Here is an example adapted from: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pta.htm

<cfmail
query="QUERYNAME"
to = "#QUERYNAME.EmailAdd#"
from = "#form.mailFrom#"
subject = "#form.subject#">
Dear #QUERYNAME.Full_Name#,
This message was sent by an automatic mailer built with cfmail:
= = = = = = = = = = = = = = = = = = = = = = = = = = =
#form.body#
</cfmail>

Once you get to this point the most important thing to remember is to check your query results very CAREFULLY to make sure that you are only sending out emails to the people you want to receive them.

Monday, October 15, 2007

Application.cfm Info

(Yes I usually work in a UNIX environment with its damned case sensitivity ;) )

Yea, so beyond that I saw a question about how Coldfusion processes Application.cfm pages and thought I would put a link to the live doc note about it from Adobe.

HERE it is

Something else that is worth noting for those of us who get to work in really state of the art environments where we are fighting for every millisecond of processing time; It really pays to have an Application.cfm page in every application even if it is blank because CF takes its sweet time looking up the directory tree.

At the same time every folder should have a OnRequestEnd.cfm page even if its blank. I've seen a 10 ms difference without it. See the live doc here.

Get a YouTube Thumbnail of a Video

I wasn't a big YouTube fan until I bought my iPhone... Opps.

Anyways I was looking through unanswered questions on EE and found someone asking questions about generating a thumbnail image for YouTube videos. I was kind of amazed that no one had answered it so I jumped on Google and took a look at their API docs at http://code.google.com/apis/youtube/developers_guide_protocol.html and found that even if you don't want to use their "GData" feeds you can get a Thumbnail for a video if you have the unique identifier for the video (url.v).

Its a simple matter of putting the unique identifier into the following link template http://img.youtube.com/vi/#url.v#/1.jpg

Wednesday, October 10, 2007

Damn you Ray!

and now I'm hooked... there goes the next two productive hours of my work week.

Friday, October 05, 2007

A Photo Of Me

A couple of people have asked me how I picture myself, so here you go:

Tuesday, September 25, 2007

Fusebox and CF Debug setting Issue?

I was playing with the different debugging settings on my development box the other day and I changed the Report Execution Times from 'classic' to 'tree' thinking that it would be something different.

I needed to do some work on a a FB 5 application and it continued to hang and hang until it ultimately timed out. I've been scratching my head for the past 2 hours trying to track down what is going on and amazingly remembered the change to the debugging settings. Go figure that when I changed back to 'classic' the pages load as they should.

Cisco VPN Client for Vista

Just a note for those early adopters of Vista out there (I got it the first day because I'm just cool like that), the Cisco VPN clients < 4.X will not work. You need to find a copy of 5.X and hope that the security policies will allow you to use that adapter.

good luck