Archive

Archive for August, 2009

CFCHART Experiment

August 23rd, 2009 amclean No comments

One of the projects I’m working on has a number of disk space requirements and I decided to play around with CFCHART to give me an “at-a-glance” idea how much space is left on the drive without having to go into the server backend. I mostly used tips from Ray Camden’s site here.

Not much to it – like I said, it’s just an experiment so I didn’t jazz it up at all, but it works.

<cfset fileOb = createObject("java", "java.io.File").init("/")>

<cfset usable = #fileOb.getUsableSpace()#/1024/1024/1024>
<cfset total = #fileOb.getTotalSpace()#/1024/1024/1024>

<cfset used = total-usable>

<cfchart format="flash" chartHeight = "300" chartWidth = "600" foregroundcolor="Blue">
<cfchartseries type="pie" colorlist="blue,red">
<cfchartdata item = "Available" value = "#round(usable)#">
<cfchartdata item = "Used" value = "#round(used)#">
</cfchartseries>
</cfchart>

I’m working off my laptop with a 220 GB partition, 60 of which is taken. It says 161 free because it’s rounding, but the numbers are essentially right. The repeated use of 1024 simply bumps the value up from bytes to kilobytes to megabytes to gigabytes. Everything else is pretty self-explanitory. Good thing Ray Camden is around because I never would have figured out that frst line for myself.

Edit: In case anyone wonders, the first line in which I put “/” can be replaced with a specific drive such as “C:/” or “D:/” but I chose to use the webroot. Any linux path will also work.

Categories: ColdFusion Tags:

Hosting Issues

August 23rd, 2009 amclean No comments

If anyone visited the site and was greeted by a “domain deactivated” message over the weekend, it’s just a bit of a hiccup with my hosting provider, it’ll be taken care of within a couple days.

Categories: News Tags:

Back In Business

August 6th, 2009 amclean No comments

Well things were touch and go for a while there, and stress was shared by all, but I’m back to programming again. Funding for both an old and a new project is imminent and so I returned to work eagerly. Of course nothing ever happens on time so the artificial deadline three weeks past is long gone, but I’d rather wait on funding for a contract than work for the Man.

I created a warm-up app for internal business use. Essentially it activates users for a service without them needing to pay for it. It was something we had to do manually before and was getting to be a pain. But those days are gone now and I’ve had a chance to get back into things, and in the meantime was reminded of the fact that linux is sensitive to camelCase SQL queries.

I went tubing in a river a couple days back, and with my wife out of town it was all too easy to blow off the sunscreen. Three hours later everyone tells me I’m really pink and I don’t believe them. But I sure feel it now.

Categories: News Tags: