Category Archives: Code

Software Development

The Cloud defined in a sentence, 12 bullet points and 3 pictures

Kudos to someone at apps.gov or NIST for a great 2 minute summary of the cloud. My summary of the summary:

Cloud Computing Defined

Cloud computing is a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources e.g., networks, servers, storage, applications, and services that can be rapidly provisioned and released with minimal management effort.
Cloud computing - picture by http://cloudtimes.org

Five Characteristics of Cloud Computing

  • On-demand, self service
  • Wide network access
  • Resources dynamically shared and allocated across customers
  • Elastic rapid provision and release
  • Metered service

Three Main Layers of Service Provided by Cloud Computing

  • Saas: Software as a service, for end-user consumers
  • Paas: Platform as a service, for software developers
  • Iaas: Infrastructure as a service, for system administrators

Two Axes of Choice for Cloud Deployment

  • Public vs Private
  • Outsourced vs In-house

And finally a bonus:

A History of Cloud Computing in Three Sentences

  • It began life as “Grid Computing” – a technology to solve large problems with parallel computing on widely distributed resources.
  • Grid computing matured to be offered as a metered service known as “utility computing”.
  • This evolved via packaged solutions and self-service subscription over the internet into what is now known as Cloud Computing.

Condensed from http://info.apps.gov/content/what-cloud

AppleScript : Start a background process and get the pid to kill it

Like so:

do shell script ("cd /Users/myName/Sites/FitNesse ; java -jar fitnesse-standalone.jar -p 5555  &> fitNesse.log & echo $!")
set pid to the result
open location "http://localhost:5555/"
display dialog "Press okay to shutdown FitNesse (" & pid & ")" buttons {"OK"}
do shell script ("kill " & pid)

To see it work, open AppleScript Editor, and paste in the script.
Save it first as a script, then Export it as an Application.

A couple of tricks are involved, the two least well-known are perhaps:

  • $! will return the pid of the most recently started background process
  • You may not need to log output but you still apparently need an output redirection clause such as &> /dev/null“. Otherwise AppleScript waits for the stdout / stderr to free up. Which never happens.
  • You usually want to cd to the right directory when you run a shell script from AppleScript

Boot Camp drivers for Windows 8 for Mac

It turns out that Windows 8 is largely the same as Windows 7 as far as drivers go, so most Mac/Boot Camp users on Windows 7 waiting for Apple to release Windows 8 drivers can just go ahead and install Windows 8 on an existing Windows 7 partition.

If you are upgrading from anything earlier – Vista or XP – then you will have to download the latest BootCamp drivers – aka Windows Support Software – from Apple. The easy way to do this is to run Boot Camp Assistant from within OS X, and tick the box for ‘Download the latest Windows support software from Apple’.

If Boot Camp Assistant fails to download the drivers for you, then you can still get the by following instructions on /p682/download-bootcamp-drivers.

If you’ve removed OS X from your Mac and have to do the download in Windows, then you’ll also need this page /p860/opening-a-bootcamp-driver-download-on-windows-7-or-8-with-7-zip

A couple of people have reported that the drivers don’t work 100%. I’m not sure which models work completely, all I can tell you is that for my Core2 Duo MacBookPro everything works fine, including the camera, backlit keyboard, and screen resolution.

VS2010 Command Prompt Here on the Windows Explorer Right Click Menu — the .reg File

VS2010 Command Line Here for Explorer Right Click Menu

To add a Visual Studio 2010 Command Prompt Here to your Explorer Right-Click menu, save this as a .reg file to your desktop, and then run it:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Line VS2010]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Line VS2010\command]
@="cmd.exe /k echo on & pushd \"%1\" & \"C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat\" x86"

If you have 64-bit Windows, you’ll need this:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Line VS2010]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Line VS2010\command]
@="cmd.exe /k echo on & pushd \"%1\" & \"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat\" x86"