• Home
  • About Jon Dowdle
  • Lifestream
KEEP IN TOUCH

Posts in category Programming

Make CF Builder and OS X Prettier

Oct20
2009
Written by Jon Dowdle

At CFinNC, Sam Farmer mentioned that one draw back of using CF Builder as a plugin was that you don't have the CF Builder icon displayed. While I agree this isn't a huge issue, it does take a bit away from the 'experience' (OS X looks good and who are we to detract from that?)

Good news, it's an easy fix. You'll soon have a nice high-resolution icon for both your dock icons and Eclipse.app.

  1. Save the Coldfusion PNG from Wikipedia (http://en.wikipedia.org/wiki/File:ColdFusion_icon.png) to your hard drive
  2. Convert the PNG from step 1 to an ICNS and save back to your hard drive. (I used iConvert http://iconverticons.com/)
  3. Open /Applications/eclipse (or wherever you installed Eclipse)
  4. Right click on Eclipse, select Show Package Contents
  5. Go to Contents > Resources
  6. [Optional] Rename Eclipse.icns to Eclipse_old.icns
  7. Copy Eclipse.icns from step 1 into the Resources folder
  8. Launch Eclipse
  9. Enjoy.

You should then see something like this:

App View
Dock View


Query the Web with a Simple Tag: YQL Custom Tag + examples

Sep10
2009
Written by Jon Dowdle

I've created a Coldfusion tag to make using YQL (even) easier. I was really surprised to find nothing doing this already. I'm not sure if it is just to simple in the first place or that there is a general lack of interest. Feel free to shed some light on this in the comments. Enough talking already, lets get some demo action going.

The basic usage is pretty similar to another oh-so familiar tag:

<cf_yql>
Select * from flickr.photos.recent
</cf_yql>

<cfloop query="cfyql">
 <!---Format of the static urls to flickr images--->
 <cfoutput>
   <img src="http://farm#farm#.static.flickr.com/#server#/#id#_#secret#_s_d.jpg" />
 </cfoutput>
</cfloop>

Creates...

Top Flickr Photos

As you can see, the format is pretty similar to cfquery. The table name "flickr.photos.recent" is table supported by the YQL (for a full listing of available tables see the footnotes).

Here is another example using an RSS feed:

<cf_yql format="query">
select * from rss where url='http://rss.news.yahoo.com/rss/topstories'
limit 5
</cf_yql>

<cfloop query="cfyql">
 <li>
 <cfoutput><a href="#link#">#title# &mdash; #Source# &mdash; #pubdate#</a>
 <div>#description#</div>
 </cfoutput>
 </li>
</cfloop>
</ul>

Creates...

News Feed

In the future, I'd like to take this further by using YQL's newly added 'execute' functionality.

The project is hosted on github. Feel free to fork me or download the code here.

Edit: Yes, I know this looks like Ray Camden's cf_yql example (http://www.coldfusionjedi.com/index.cfm/2009/9/10/Yahoo-Query-Language) posted earlier today (9/10/09). I had written this post originally on 8/28 and just never got around to publishing it. Ray just lit a fire under my arse by posting his, so thanks Ray!

Items referenced while writing this post:
  • YQL OpenData Tables: http://github.com/spullara/yql-tables/tree/master
  • YQL Execute: http://developer.yahoo.net/blog/archives/2009/04/yql_execute.html
  • http://eatyourgreens.org.uk/archives/2009/04/building-a-kml-feed-with-yql-and-coldfusion.html
« Older Entries

Recent Posts

  • Code from TDD Demystified through Katas
  • Awesome Web Development Links Found This Week
  • Taggable Demo Video (now with more code)
  • Taggable Demo Video
  • New jQuery Plugin: Taggable

Categories

  • Code
    • MySQL
    • Programming
    • Web Design
  • coldfusion
  • Life
    • Events
  • Reviews
  • Uncategorized
  • Work

Tags

adobe barcamp barcamporlando coldfusion ComplexByteArrayException concat conferences decorator design pattern Events firebug Form fowa html IE ignite infection control iterator javascript job jQuery movies MySql orlando Photos pirate booty pirates plugins poll project python railo software development sql stackoverflow stax.net style taggable tags talk like a pirate tips & tricks tools twitter washington dc Web Design

RSS Syndication

  • All posts
  • All comments

EvoLve theme by Theme4Press  •  Powered by WordPress jDowdle.com