Nov 27 2009

Using Git with CFML

Today I was writing a little app that helps me keep up with my Todo list, since I wanted to have a web interface for some reporting into my tasks.

The issue is that my todo list is just a text file (and before you go saying there are various apps, I am happy with my text file ok? for various reasons which are not part of this post), so I built a nice web interface to it, but the problem is that since I can modify it, and whilst I was developing it I wanted a way to back this file up. I mean, whist I am coding this app, I might make mistakes and want to roll back. 

So I got thinking of a way to do this and realised I do this every day anyway, using git!. So, I thought, for every change I do to the file, why not check it into its repository.

I fiddled about with cfexecute, which to be honest I haven't used much previously but I couldn't change the working directory, so, thanks to Tim Blair's post I managed to do the following: 

 

<!--- since we have made modifications to the files, we need to commit them in git --->

 <cfscript>  

     // first of we set the command to call  

     cmd1 = "git add TODO.txt";  

     cmd2 = "git commit -m 'autobackup'";

     // the environment variable is empty  

     envp = arraynew(1);  

     // and we want to run from a given "root"  

     path = "/Volumes/iDisk/Documents/TODO";  

     dir = createobject("java", "java.io.File").init(path);  

     // get the java runtime object  

     rt = createobject("java", "java.lang.Runtime").getRuntime();  

     // and make the exec call to run the command  

rt.exec(cmd1, envp, dir);

rt.exec(cmd2, envp, dir);  

 </cfscript>

And that's it. Every time the file is changed, it is added to my git repo locally. Handy!

 

4 comments - Posted by Mark Drew at 5:57 AM - Categories: tips | cfml

Oct 27 2009

BarCamp London 7 Wrap up

IMG_1229This weekend I attended the London BarCamp 7 for the first time. I kept on missing these events before, finding out too late what it was all about and that it was on, but this year I was lucky enough to get a ticket (free I might add) from the lottery.

For those who don't know, BarCamp is a great 'unconference', that is, there are no pre-scheduled talks before the conference starts, and after the welcoming talk, people write down a topic to talk about for 20 minutes and assign it to a slot in the massive schedule.

The event was held at the IBM building by London's South Bank,a great building and there were plenty of rooms and more than plenty of talks to attend during the day and into the evening.

What surprised me was the great variety of talks that were available and the different roles within the industry that they were targeted at. All the way from Agile to CSS to Google Wave Demos.

If you can, I strongly suggest that you attend a BarCamp event if there is one near you.

On a side note, Martin Shaw and I run a session on the Pomodoro Technique and I even tried to get people into ColdFusion, but alas there was not much interest (I shall blog more on this in a later post)

3 comments - Posted by Mark Drew at 9:31 AM - Categories: barcamp

Oct 15 2009

Testing sent emails during development

There are many times when I get to the part of developing on my local machine that I want a smtp server to use. I have tried postfix and some other unix type applications on OS X for this but none of them were quite what I wanted, since I want to also integrate tests with it.

And to be honest, it took me too much time (that I don't have as you have noticed by the lack of blog posts) to figure out all the settings to do this.

Until I found fakemail (http://sourceforge.net/projects/fakemail/).

Fakemail is a python (or perl) script that you can run to simulate an SMTP server, but more importantly you can define where the emails that are sent out go.

It is very easy to install (check out this page: http://www.lastcraft.com/fakemail.php) and run, and does the trick splendidly.

4 comments - Posted by Mark Drew at 9:42 PM - Categories: development

Sep 11 2009

Railo in a Software as a Service environment

Straker, the makers of ShadoCMS and Zoom Flex have put up a great blog posting regarding using Railo in a Software as a Service environment.

They cover four areas such as Scalability, Security, Cost and Updates and even though it shows the Railo Server as a winner it is a overally fairly balanced article from the point of view of their requirements

Check out the full blog post on the Straker Blog

1 comments - Posted by Mark Drew at 3:42 PM - Categories: cloud | railo | getrailo

Jun 29 2009

A big thanks to the NYCFUG

This weekend I got a package in the post, with an awesome t-shirt from the NYCFUG! I want to thank Clark Valberg and Ben Nadel from Epicenter Consulting for sending me such an awesome item as well as for the fantastic reception I had at the NYCFUG in May! 

IMG_0870 

 

8 comments - Posted by Mark Drew at 4:48 PM - Categories: railo | coldfusion | reactor

Jun 11 2009

Mobile Gaming Developer Position in London

Unrelated to my usual CF shenanigans, but a friend of mine is looking for a developer to work in their London office. THIS IS NOT A CF ROLE. And also, agencies, not for you, they will not pay you a dime. Nor will I so dont email me.

=============- Job Spec -==============

Developer required to join the small development team of an award
winning and industry leader in mobile gambling. Developing robust
applications and services. Maintaining an extensive code and resource
base with easily maintainable, scalable and flexible code. Must come
with flexibility as well as a good attitude to development and finding
the right solution to any technical problem faced.

Read more...

0 comments - Posted by Mark Drew at 4:42 PM - Categories: Java | jobs

Jun 10 2009

Scotch on the Road and CFObjective Presentations

A few people have asked me to post my presentations, and I should have done so anyway straight after the conferences, but of course, since I did three presentations + a Mystery Theatre at cfobjective and four presentations at Scotch on the Road I have been falling behind normal work and blog postings.

So, here for your delectation are all the presentations for you to download... (apart from the Mystery Theatre 3000 since that has a naughty picture in it)

7 comments - Posted by Mark Drew at 4:25 PM - Categories: cloud | railo | cfObjective | scotch on the rocks | model-glue | reactor | presentations

Search Archives

Contribute


MD on Twitter

Categories

coldfusion cfeclipse personal apple cfconferences ukcfug model-glue webdev blogging cfunited coldspring railo presentations adobe cfobjective scotch on the rocks reactor lost jobs ajax eclipse flex model-glue frameworks max google podcast podcasting reference ask md fusebox getrailo spam cfml donations eventvalidation fusiondebug air blue dragon cloud development flying funny java microsoft music snipex tattoo tips apple aptana blog cfml derby eventguard graphic novels hosting itunes metrics open bluedragon rant wishlist apollo barcamp bolt cebit cfdevcon cfonwheels cfug codeshare codeswarm coldfusioncamp directing doh! firefox flash gadgets groovy jquery mdc mvc ooops pownce quack regex spry subversion tashr transfer webservices xml

Monthly Archives