Home | Blog | Twitter @AndyJ | Contact Me | Snippets/Downloads | RSS

ORM on Railo

Gert (of Railo) has just tweeted that if you ping them via their Contact form they'll give you access to the pre-release group.

This is a good chance to test your CF9 apps against Railo implementation or just to give ORM a whirl

git and file name case

I needed to change the case of 2 files recently which when it came to committing with Git did not take. It seems since version 1.5.6 you can set ignorecase = "true" which seems to be the default.

To change this setting go to your project and edit the .git/config and set ignorecase = "false" or simply remove it

Fridays Joke: excessively mischievous

Two little boys, ages 8 and 10, were excessively mischievous. They were always getting into trouble and their parents knew all about it. If any mischief occurred in their town, the two boys were probably involved.

The boys' mother heard that a preacher in town had been successful in disciplining children, so she asked if he would speak with her boys.

[More]

Free git book resource

Git Logo

http://progit.org/ is a website for the Pro Git book, written by Scott Chacon. Whats great is that you can read the full contents online (like the SVN book) so it acts as a great Git resource to have. Covering everything from a history of Git, to getting started, the Protocols, distributed workflows, and event migrating from SVN to Git. If you haven't looked at Git yet or just starting then bookmark it now.

You can of course support the book and buy a print copy copy for your bookshelf.

FW/1 and redirect in the application.cfc

Chatting with AJ Mercer this morning (his evening) on getting redirect() to work in the Application.cfc for Framework One (FW/1). The code being he was using looked perfectly fine:

   view plainprintabout
 rc.variableToPass = "me";
 redirect(variables.framework.home, 'all', 'variableToPass');

As I said this looked fine and works in the controllers but in the Application.cfc we just saw "&fw1pk=[some number]" appended to the URL. The fix was quite simple. The variable/structure RC is set as a shortcut to the Request.Context for the controllers but in the Application.cfc you need to reference Request.Context directly. The meant the above code changed to:

   view plainprintabout
 request.context.variableToPass = "me";
 redirect(variables.framework.home, 'all', 'variableToPass');

and all worked fine.

As a side note the fix for this came from it being such a simple framework to hack in to and see whats happening over others with multiple core files and components. Recently my work ethics has changed a lot and in its place 2 components now stand, convention over configuration and simplicity both of which FW/1 fits the bill. So if you haven't spent 30 minutes looking at it do so and also check out the Google group at http://groups.google.com/group/framework-one

i want a computer that works

Go to google.com. Put in "i want a computer that works" and hit "I'm feeling lucky

Its probably really old but it made me laugh. I found it via the vid below

via TUAW

Google Chrome hijacks 404 pages

I was testing a custom 404 page this morning on Chrome when instead of seeing my page I got the following

You can turn it off on YOUR computer but the problem is that you can't do it for your users. This means that if you use your 404 pages to try and re-direct your users to the right link or even revenue via ads then you loose out! It would be nice if you can set a HTTP header or something along these lines to tell Google to not be clever but till now

To turn this off on the Mac go to Chrome > Preferences > Under the Hood and deselect "Show suggestions for navigation errors".

For other OS instructions check out http://www.google.com/support/chrome/bin/answer.py?answer=95671&hl=en

You can pipe DIFF to TextMate

DIFF is a compare tool that you can use from the Terminal to compare files. What I did not know though is that you can PIPE the results to Textmate
   view plainprintabout
 diff /path/to/project/index.cfm /path/to/project/index.cfm | mate

Fridays Joke: The Boyfriend

A 5-year-old boy went to visit his grandmother one day. Playing with his toys in her bedroom while grandma was dusting, he looked up and said, 'Grandma, how come you don't have a boyfriend now that Grandpa went to heaven?'

Grandma replied, 'Honey, my TV is my boyfriend. I can sit in my bedroom and watch it all day long. The religious programs make me feel good and the comedies make me laugh. I'm happy with my TV as my boyfriend.'

[More]

htaccess for moving domain names

Apache uses .htaccess files as a way to make configuration changes on a per-directory (and subdirectories) basis. They are a powerful tool when it comes to moving folders of changed files or in my case domain name rewriting.

Currently I am using a short domain name (prsos.co.uk) as a redirect to a specific page on the full domain name petrescuesos.co.uk. In the past I've even used ColdFusion to do by putting something along the lines in my Application.cfm.

   view plainprintabout
 <cfif findNoCase('prsos', cgi.server_name)>
 <cfheader statustext="Moved permanently" statuscode="301" />
 <cfheader value="http://www.petrescuesos.co.uk" name="Location">
 </cfif>

This still gives the browser/spider the correct http header but why waste cpu styles on even doing this when the web-server can handle it natively. Below is the Apache .htaccess I've just put in place.

   view plainprintabout
 #Turn rewrite on
 RewriteEngine on
 #Look at the HTTP_HOST and regex search for old domain name
 rewritecond %{http_host} ^(.*)prsos.co.uk [nc]
 # The rule. Change the http_host to the new domain location. NC means NoCase
 rewriterule ^(.*)$ http://www.petrescuesos.co.uk/index.cfm?action=pets.found [r=301,nc]

More Entries

BlogCFC / created by Raymond Camden / running version 5.9.5.003 / Contact AndyJarrett.com / Pet Rescue SOS www.redgiraffes.co.uk