Helpful links and definitions of Raspberry Pi related hardware / software for the absolute beginner

Raspberry Pi First Boot
Here is the first boot up of my Raspberry Pi

The Raspberry Pi is basically a $25 computer (Model A) or a $35 computer (Model B) meant to encourage children to learn programming by providing an affordable computing platform that can drive all kinds of projects from controlling robots to running a media center on a tv. I am not a hardcore programmer so I bought one to tinker and encourage my inner programming child.

I bought the Model B because it has 512MB Ram, 2 USB ports, and an ethernet port. The model A has 256MB Ram, 1 USB port, and no ethernet port.

So far I have managed three tasks.

  1. I have booted up with a copy of Raspbian “Wheezy”, surfed the internet and installed a mail client.
  2. I have booted up with a copy of Raspbmc, added some music, and took XBMC for a test drive.
  3. I have installed XBMC Commander to my iPhone and controlled my Raspbmc installation by playing music, videos, etc. I had varying degrees of success with this task.

Rather than copy other people’s fine tutorials I am going to provide definitions of the different technologies, as defined at their site(s). Below the definitions are link(s) to the site(s).

Raspberry Pi

What is (a) Raspberry Pi

“The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard.”

Raspberry Pi Site

Task 1: Raspbian

What is Raspbian

“Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware.”

Wheezy is the recommended starting distro. There is also a link below to a distro that uses the MATE desktop environement instead of the LXDE desktop environment that “Wheezy” uses.

Raspbian “wheezy”

Bootable Raspbian “Pisces+MATE” Image by Mike Thompson

Task 2: Raspbmc

What is Raspbmc?

“Raspbmc is a minimal Linux distribution based on Debian that brings XBMC to your Raspberry Pi.”

Raspbmc Site

Task 3: XBMC / XBMC Commander

What is XBMC?

“A Complete media center solution for Windows, OSX, Linux, and more!”

XBMC Site

What is XBMC Commander?

“XBMC Commander is a remote control for the iPad especially designed to interact with XBMC, one of the most advanced open source media centers out there.” (There are iPhone and Adroid versions as well)

XBMC Commander Site

App Store Software – What the Description Really Means

I buy a lot of software.  A LOT OF SOFTWARE.  The following is my tongue-in-cheek assessment of App Store software descriptions.

Gorgeous / Stunning Graphics

We have a graphic artist.  We think her work is awesome.  Lots of companies have awesome graphic artists.  Many times they are pretty much as awesome.

Feature Rich

Our app is really complex.  We put a whole bunch of stuff into it.  Unfortunately the Pareto principle (80/20 Rule) likely applies.

Minimalist

Our app is really sparse.  We <3 Getting Real.  This may or may not be good for you depending on what we consider essential.

Our most awesome version to date

Our last version had bugs / was less than awesome.

Frequent Updates

See “Our most awesome version to date”.

Winner of the Blah Blah Blah Award

If it’s not an Oscar or a Grammy… well ok, if it’s not an Oscar be suspicious.

Helpful Commands for ColdFusion 10 on OSX… aka Start and Stop CF10 from the command line

This post assumes you are working with the default instance (cfsusion) and that you installed ColdFusion 10 to the default location on you Mac.

STATUS:
/Applications/ColdFusion10/cfusion/bin/coldfusion status

START:
/Applications/ColdFusion10/cfusion/bin/cf-standalone-startup
OR
/Applications/ColdFusion10/cfusion/bin/coldfusion start

STOP:
/Applications/ColdFusion10/cfusion/bin/coldfusion stop

RESTART:
/Applications/ColdFusion10/cfusion/bin/coldfusion restart

Launch GUI for configuring Web Connectors:
sudo /Applications/ColdFusion10/cfusion/runtime/bin/wsconfig

RESET CFADMIN PASSWORD:
/Applications/ColdFusion10/cfusion/bin/passwordreset.sh
(Then Enter 1 for changing Admin Password and put in your new super strong password!)

.

Using not() in jQuery to exclude a member of a class

This is just a quick tip I thought I throw out there. We have an application that applies a fade to a .alert class on all its pages. We have 2 pages that need to not fade one particular alert. Here is one way it can be handled.

  1. Add a class of .notfade to the alert that needs to stay put and not fade out:
    <div class="alert alert-info nofade"></div>
  2. Place the following in $().ready(): $(".alert").not(".notfade")fadeOut(7000);

RDS Query Viewer not working: How to fix the ColdFusion Builder error: ‘/YOURPROJECTFOLDER/.rdsTempFiles/RDS Query Viewer’ does not exist

I have had this issue for a while and it finally made me crazy enough to try to figure it out. It appears that this error occurs when the “RDS Query Viewer” file does not exist in the .rdsTempFiles folder within your project.

On Mac

  1. Open Terminal
  2. Navigate to the directory where your project is located. For example type: cd /Applications/ColdFusion9/wwwroot/YOURPROJECTFOLDER and hit <enter>
  3. If the “.rdsTempFiles” directory does not exist type: mkdir .rdsTempFiles and hit <enter>
  4. If the “RDS Query Viewer” file does not exist type: touch “.rdsTempFiles/RDS Query Viewer” and hit <enter>. BE SURE TO SURROUND THE COMMAND WITH THE DOUBLE QUOTES BECAUSE THE FILE NAME HAS SPACES.
  5. Refresh the “RDS Query Viewer” view. RDS Query View should work now.

On Windows

  1. Open DOS
  2. Navigate to the directory where your project is located. For example type: cd C:\ColdFusion9\wwwroot\YOURPROJECTFOLDER and hit <enter>
  3. If the “.rdsTempFiles” directory does not exist type: mkdir .rdsTempFiles\rdsTempFiles and hit <enter>
  4. If the “RDS Query Viewer” file does not exist type: fsutil file createnew “RDS Query Viewer” 0 and hit <enter>. BE SURE TO SURROUND THE COMMAND WITH THE DOUBLE QUOTES BECAUSE THE FILE NAME HAS SPACES.
  5. Refresh the “RDS Query Viewer” view. RDS Query View should work now.

ColdFusion 9 SELECT IN query using ormExecuteQuery()

For some reason this took me some effort to figure out. Maybe others will find it useful.

<cfscript>
CategoryList = '1,2,3';
Categories = ormExecuteQuery("from Category where Id IN (:IdList)",{IdList=ListToArray(CategoryList)});
</cfscript>

If you know a better way please drop me a comment. I posted this in the Adobe Coldfusion forum for a few days but didn’t get anything.

Adding more resource navigator filters to ColdFusion Builder (Eclipse) Redux

There is a post at 12robots.com for how to add resource navigator filters to CFBuilder:

http://www.12robots.com/index.cfm/2010/8/10/Adding-more-resource-navigator-filters-to-ColdFusion-Builder-Eclipse

The solution below is similar, but does not involve accessing .jar files.

Step 1: Locate your version of CFBuilder by selecting “About Adobe ColdFusion Builder 2”.  Make a note of the Version and Build numbers.  For this post I am on Version: 2.0.0 and Build: 277745
Step 2: Locate the plugin.xml file in the com.adobe.ide.coldfusion.rcp_X.X.X.XXXXXX folder (Notice how X.X.X.XXXXXX corresponds to the Version and Build from Step 1):
com.adobe.ide.coldfusion.rcp_2.0.0.277745
Step 2: Locate the following section:
<extension
point="org.eclipse.ui.ide.resourceFilters">

Step 3: Add a block like this for each new filter you want:
<filter
pattern="_notes"
selected="true"/>

Step 4: Start CFBuilder from the command line.  For me on the Mac I execute the following command in Terminal:
"/Applications/Adobe ColdFusion Builder 2/CFBuilder.app/Contents/MacOS/CFBuilder" -clean
Step 5: Enjoy your new navigator filter(s).

Add a last modified date to FW/1 (Framework One) pages

Disclaimer:

  1. I’m a total newb to FW/1.
  2. There is most likely a better, or built in way to do this.

Still with me?  Ok.  Here is the specification for this little ditty:

  1. The site I’m working on is mostly static.
  2. It is required (perhaps legally, definitely procedurally) that every page of the site must have a last modified date in the footer.
  3. The site is built using FW/1 (which is awesome).

Here are the cliff notes of what’s about to go down:

  1. I have a footer that is included in every page.
  2. In the footer view Im going to look at the current page’s action in the request context (rc) and figure out what the corresponding “view” is based on the action
  3. I’m going to use cfdirectory to find the lastmodifieddate of the view file from step 2.

Without further adieu:


<!— Start with the path to our views folder —>
<cfset local.viewPath=”#VARIABLES.FRAMEWORK.BASE#views” />
<!— Make an array of rc.action (we use this to append subfolders) —>
<cfset local.arrAction=ListToArray(rc.action,”.”) />
<!— Set the counter to be 1 short of the action array len b/c the last member will be our view page —>
<cfset local.counter=ArrayLen(local.arrAction)-1 />
<!— Set the last member of our action array to be our action page —>
<cfset local.viewPage=”#local.arrAction[ArrayLen(local.arrAction)]#.cfm” />
<!— Append any subfolders to our viewPath —>
<cfloop from=”1″ to=”#local.counter#” index=”local.a”>
<cfset local.viewPath=”#local.viewPath#/#local.arrAction[local.a]#” />
</cfloop>
<!— Look for our viewPage cfm file in our viewPath —>
<cfdirectory action=”list”
directory=”#ExpandPath(local.viewPath)#”
name=”qGetLastdateModified”
filter=”#ListLast(local.viewPage, “/”)#”>
<!— If we have a record count then calculate the last modified date —>
<cfif qGetLastdateModified.recordCount>
<cfset local.siteLastUpdated=’#DateFormat(qGetLastdateModified.dateLastModified,”long”)# at #TimeFormat(qGetLastdateModified.dateLastModified,”hh:mm:ss tt”)#’ />
<cfelse>
<cfset local.siteLastUpdated=”unknown :- (” />
</cfif>
<cfoutput>#local.siteLastUpdated#</cfoutput>