Photos from the Dallas Adobe User Group Tour event

InstantSpot, Tips and Tricks

We had a great time Friday night with around 170 in attendance!  Terry did a great job and everyone left hungry for the new releases that he teased.  Here are some pics from the night.

 

0

ColdFusion in odd places - using the directory watcher on my desktop

ColdFusion, InstantSpot, Tips and Tricks

Since recently installling yet another distro on my laptop, I was unable to get the FTP functionality of my webcam software (Camorama) to work properly. The program will save snapshots locally, but bombs on transfer. Rather than troubleshoot it to death, I decided to whip out a quick and dirty ColdFusion directory watcher event gateway and have it watch for updated images, and then push them to my webserver via FTP.

For anyone interested in this non-earth shattering bit of code, here it is. First I created a config file:

WebcamWatcher.cfg

# The directory we want to watch. 
directory=/home/dshuck/Webcam_Pictures

# Do we want to recurse the directories?
recurse=no

# miliseconds between checks
interval=6000

# The comma separated list of extensions to match.
extensions=*

# component method for change events
changeFunction=onChange

# component method for add events
addFunction=onAdd

# no delete events for now
deleteFunction= 

Now to create the methods in our WebcamWatcher.cfc. In short, either a changed file or an added file will trigger the putImage function which first creates the FTP connection, changes directories to my webcam directory, then pushes the file to the server. Here is the code:

WebcamWatcher.cfc

<cfcomponent output="false">
	<cffunction name="onAdd" output="false">
		<cfargument name="CFEvent" type="struct" required="yes">
		<cfset var Data=CFEvent.data />
	  	<cflog file="DirectoryWatcher" application="No" 
	     	text=" ACTION: #data.type#;  FILE: #data.filename#;  calling putImage()" />
		<cfset putImage() />
	</cffunction>
	

	<cffunction name="onChange" output="false">
	  	<cfargument name="CFEvent" type="struct" required="yes">
	  	<cfset var data=CFEvent.data>
	  	<cflog file="DirectoryWatcher" application="No" 
	      text=" ACTION: #data.type#;  FILE: #data.filename#; TIME: #timeFormat(data.lastmodified)# calling putImage();" />
		<cfset putImage() />
	</cffunction>

	<cffunction name="putImage" access="private" output="false" returntype="void">
		<cfftp action = "open"
	   		username = "joeuser"
	  		connection = "MyConnection"
	   		password = "mycoolpassword"
	   		server = "www.mywebserver.com"
	   		stopOnError = "true" />
		
		<cfif cfftp.Succeeded>
			<cfftp 
				connection="MyConnection" 
				action="changedir" 
				directory="htdocs/mywebcamdirectory" />
			
			<cfif cfftp.Succeeded>
				<cfftp 
					connection = "MyConnection"
					action = "putFile" 
					name = "uploadFile" 
					transferMode = "binary" 
					localFile = "/home/dshuck/Webcam_Pictures/webcam.jpeg" 
					remoteFile = "DaveWebcam.jpg" />
			</cfif>
	
		</cfif>
		<cflog file="DirectoryWatcher" application="false" text="file push to webserver...#cfftp.Succeeded#" />
	</cffunction>
</cfcomponent>

So, now the internet can yet again be graced with my "almost live" presence. I can almost hear the selective sigh of relief.

I have to consider this to be a somewhat odd place for ColdFusion and it got me thinking... What kinds of odd places do you or have you used ColdFusion?

+1

We're on the ColdFusion Weekly!

ColdFusion, InstantSpot

The latest version of the ColdFusion Weekly podcast was released yesterday.  Matt and Peter were kind enough to have Aaron and I on to talk about InstantSpot.  This was actually our second time to have this opportunity, although we had *much* more to talk about given our experiences over the last 14 months since the previous visit! 

We covered a lot of areas from how it all came about in the first place, to some of our trials and tribulations rolling out the latest release and all points in between.   If you would like to hear some of our experiences and the technology behind our network, I urge you to check it out.

Download Icon Download Version 3.02

 

+2

Yes ColdFusion fans... we *are* a ColdFusion site!

ColdFusion, InstantSpot

I don't know how pervasive this point of confusion is, but today a regular face in the ColdFusion community was making some remarks in this comment thread and further on his InstantSpot site that InstantSpot is not a ColdFusion-based application, with the insinuation that he won't support our efforts because of this.

Just to be clear, no matter whether or not you actually see ".cfm" in the URL, we are running InstantSpot on Adobe ColdFusion 8, using Mach-II 1.6, ColdSpring and other community tools. We are strong advocates for ColdFusion, work with our local ColdFusion User Group, try to be evangelists for it wherever we can, and we will continue to do so.

+2

5 InstantSpot invitations

InstantSpot

If anyone is interested in creating an InstantSpot blog, we are opening up 5 new Spots today and would love to see some more ColdFusion peeps! Enter your invitation code on the main page. As soon as someone uses a code it's gone:

  • k7Nh92Sw
  • GEAGGH7B
  • rs4DPq9a
  • OUWKCEgG
  • lepvefKv

Get 'em while their hot! :)

EDIT: All gone!
+2

New pseudo-steampunk theme on my blog

InstantSpot, Blog

I have a new addiction playing with the style editor for my blog... I hate to call this a steampunk theme, simply for the inevitable flow of hardcore steampunk people coming here and telling me about how I don't know what steampunk is... so let's settle for pseudo steampunk shall we? 

Regardless, at my current rate I will change it again in a few days anyway! :)

I was also told this week that I look a lot different in my picture than I do in person.  I decided to add a headshot that says "Hey look... Dave was up all night coding again."  I think it is fairly true to life.


Search