OMXPlayer on Raspberry Pi

After adding a touch screen to my PI, I wanted to play video’s to an HDMI connected TV.

The Pi has an application called omxplayer, which lets you play video.

My main reference was this: https://www.raspberrypi.org/documentation/raspbian/applications/omxplayer.md

My final command line is this:

Pls note: there is a bug on the raspberrypi.org website, they’re missing a dash “-” for the adev parameter, I have it fixed on the command line above.
Also note: the use of the –display parameter, the number 5 tells the omxplayer to output the video to the HDMI port and not the touch screen.


Adding a USB folder to Raspberry Pi

Start by plugging in a USB Drive into one of the PI’s USB ports.
I normally work on the PI itself, so after plugging in the power and letting the system boot up, create a folder in the user PI’s home folder. I used the Terminal application from the Raspberry PI GUI:

Execute the following command to switch to the usbdrv folder:

Execute the following command to get the full path to where you are on the filesystem:

It should be: /home/pi/usbdrv
Now what we need to do is identify the port (or mount point) with the usb drive plugged in, and create a link to the folder we just created.
Let’s find the USB drive, the following command lets you do that:

(“sudo” allows you to run the command as an admin)
Here’s my output:
The important line is

Now we need to edit the file system table file. I use the VI editor (I’m old school).

Vi has its own quirks, here’s a link to the help file: Basic vi Commands. I added the following line to the end of the file:

Please Note: This is one long line of text, its not broken into many lines
What this line does is map the USB devices mount point (/dev/sda1) to the folder we created earlier (/home/pi/usbdrv). The other bits of information let the operating system know what filesystem is on the USB Drive (vfat), and that you don’t need a login, and to give us read & write access.
Once you’ve added the line and successfully saved the file, reboot the PI:

Once you’re back on the PI, you can use the File Manager application in the GUI or the Terminal application to switch to the usbdrv folder to get to the files.


Installing “fortune” on my Mac

Fortune is a terminal command that when typed who return a fortune, its something that used to be on Unix computers when I was a Unix jockey, waaay back (can’t even remember exactly when; 1989?).

Googling, resulting in executing the following command:

However, Homebrew (brew) wasn’t installed, so more Googling…

Googling, for how to install Homebrew resulted me with this page: https://coolestguidesontheplanet.com/installing-homebrew-on-macos-sierra-package-manager-for-unix-apps/

The juicy bit is this:

I received the “Installation successful!” message and went on to install fortune with the following command:

However, now I received the following error:


Had the following embedded in the output:

I then ran the following 2 commands:

and now “fortune” is working well on my Mac.

Copernicus:~ Kal$ fortune
Your good nature will bring you unbounded happiness.


Open Source and Free Applications

Recently I’ve had to work on production and staging environments (windows server 2012), and I’ve been struggling using notepad to edit config files (which happen to be in XML format) – sometimes tags get misaligned or not closed correctly, and then not having the ability to compare files in a nice graphical display. Basically the simple things; I haven’t started to address performance monitoring etc…

I recalled that there are number of great open source applications nowadays, but I didn’t want to “install” them, just copy them onto the server and run them. Well, the ones I needed can do just that.

I’ve decided to compile my list of open source applications and indicate if they have a no-install required. This is not a comprehensive list by any means, and is only focused on Microsoft Windows operating systems.

Server no-Install

Notepad++ Uncompress the zip file and run the executable. As the name suggests this is a better notepad than notepad. It has tabbed documents, understands various programming languages. However, when not installing you will have to create file associations yourself. I also had to add “config” to the User Ext, for XML in the Style Configurator.
WinMerge Uncompress the zip file and run the executable. The application will compare files and most importantly for me; folders. This is the “modern” replacement for a golden oldie I used to use; windiff.exe for the Windows Resource Kit.

Desktop Applications

Notepad++ Supports a no-install download, but I install fully.
WinMerge Supports a no-install download, but I install fully. Though in reality I don’t use it much on my development laptop.
FileZilla FTP Application. Great for getting up and down from a server.
SoapUI Supports a no-install download. Java based tool for testing web services. Its a little tricky to find the no-install version, here’s the direct link to version 5.0.0;


Fiddler Creates a proxy on the fly to capture incoming and outgoing IP traffic. Great for analyzing what applications are sending out, and what exactly is coming in. I use mainly when testing out my web service development.
Visual Studio Express Microsoft has released free versions of their development IDE. As of Nov 2014 the following versions are available; Express 2013 for Web, Express 2013 for Windows, Express 2013 for Windows Desktop, and Team Foundation Server 2013 Express.

This page is a works in progress…

Trouble with IT

“The trouble with IT experts”

So the title is a little misleading. Unfortunately there are too many business folks out there who genuinely believe this. The following video sums it all up.

Unfortunately, I’ve been there, and done that, a few too many times…

The following link helped me clean up my youtube embed code: http://leaderswest.com/2012/10/10/youtube-embed-options-can-make-your-videos-look-less-youtube-y/

Direct link to video: “I can do anything. I’m an expert”


Mexican Fisherman Meets Harvard MBA

Here’s a story that’s been kicking around the Internet, that I’m quite fond of. Not sure about the source – maybe I should snope it. Anyways, enjoy.

A vacationing American businessman standing on the pier of a quaint coastal fishing village in southern Mexico watched as a small boat with just one young Mexican fisherman pulled into the dock. Inside the small boat were several large yellowfin tuna. Enjoying the warmth of the early afternoon sun, the American complimented the Mexican on the quality of his fish.

“How long did it take you to catch them?” the American casually asked.

“Oh, a few hours,” the Mexican fisherman replied.

“Why don’t you stay out longer and catch more fish?” the American businessman then asked.

The Mexican warmly replied, “With this I have more than enough to meet my family’s needs.”

The businessman then became serious, “But what do you do with the rest of your time?”

Responding with a smile, the Mexican fisherman answered, “I sleep late, play with my children, watch ball games, and take siesta with my wife. Sometimes in the evenings I take a stroll into the village to see my friends, play the guitar, sing a few songs…”

The American businessman impatiently interrupted, “Look, I have an MBA from Harvard, and I can help you to be more profitable. You can start by fishing several hours longer every day. You can then sell the extra fish you catch. With the extra money, you can buy a bigger boat. With the additional income that larger boat will bring, before long you can buy a second boat, then a third one, and so on, until you have an entire fleet of fishing boats.”

Proud of his own sharp thinking, he excitedly elaborated a grand scheme which could bring even bigger profits, “Then, instead of selling your catch to a middleman you’ll be able to sell your fish directly to the processor, or even open your own cannery. Eventually, you could control the product, processing and distribution. You could leave this tiny coastal village and move to Mexico City, or possibly even Los Angeles or New York City, where you could even further expand your enterprise.”

Having never thought of such things, the Mexican fisherman asked, “But how long will all this take?”

After a rapid mental calculation, the Harvard MBA pronounced, “Probably about 15-20 years, maybe less if you work really hard.”

“And then what, señor?” asked the fisherman.

“Why, that’s the best part!” answered the businessman with a laugh. “When the time is right, you would sell your company stock to the public and become very rich. You would make millions.”

“Millions? Really? What would I do with it all?” asked the young fisherman in disbelief.

The businessman boasted, “Then you could happily retire with all the money you’ve made. You could move to a quaint coastal fishing village where you could sleep late, play with your grandchildren, watch ball games, and take siesta with your wife. You could stroll to the village in the evenings where you could play the guitar and sing with your friends all you want.”

Black cup of coffee


I love coffee, but I gave it up May 3rd 2013.

I used to be in denial about the negative impact that coffee was having on my health; I was using excuses such as “I need it to concentrate”, “I need it to stay up late and work”, “I need my morning wake-up coffee”, “I need my mid-afternoon pick me up”. It was the addiction speaking. Coffee had become a part of me, a part of my identity, I had moved on from normal filtered coffee to black unsweetened french pressed coffee. I loved my Starbucks coffee – especially whatever bold coffee was brewing at the time. I mean, I’ve been a Starbucks rewards member since 2003! If I could intravenously inject coffee into my veins to keep me going I would.

Starbucks Rewards Member Since 2003

Starbucks Rewards Member Since 2003

So, why did I give it up?

I gave it up because I was addicted to it. I didn’t want an addiction to rule my life. I started to read about health and healthy lifestyles, and coffee kept coming up as something that could lead to ill-health. Really? Coffee?

Here’s an article (that I didn’t write) on why coffee is bad for you. Read the article for details, but here are the articles top ten reason’s why coffee is bad for you:

  1. Cardivascular Problems
  2. Stress
  3. Emotional Problems
  4. Blood Sugar Swings
  5. Gastrointestinal Problems
  6. Nutritional Deficiencies
  7. Male Health Problems
  8. Female Health Problems
  9. Aging
  10. Adrenal Exhaustion

Not a pretty list.

“America runs on Dunkin'” – really? Sounds like America is getting sicker and sicker on Dunkin’ Donuts, and coffee in general.

Well, its been over 2 months since I stopped as I write this, and my concentration levels are higher than before; I’m not cranky or irritable; and my focus is sharper than ever. I’ve even been able to pull all-night hackathons without coffee!

Do yourselves (and your health and longevity) a favour, cut out the coffee (and caffeine in general) from your diet. You won’t regret it.

Trouble with IT

How do I increase a Virtual Box Virtual Disk Image’s size?

Need more space on your Virtual Disk image? I installed Windows 7 Ultimate (using my MSDN subscription) on Oracle’s Virtual Box, but didn’t guestimate the size of my virtual disk correctly. Let’s just say that 30gb is not enough if you want to install Office 2010, Visio for Enterprise Architects, and a flavor of Visual Studio.

Seeing as I kept the Virtual Disk dynamic, I theoretically should be able to increase the size of the disk from the Virtual Box console. Well, no such luck.

Here’s a summary of the steps required to achieve this:

  1. Create a virtual disk (as large as you want)
  2. Clone the old disk to the new disk (command line tool)
  3. Detach the old disk from the Virtual Machine (using the Virtual Box console)
  4. Attach the new disk to the Virtual Machine (using the Virtual Box console)
  5. Boot up the Virtual Machine
  6. Using Computer Management, extend disk space (i.e. within Windows 7) Continue reading
Windows 8 Dual Boot Screen

Changing the default OS Partition on a dual boot computer

I’m dual booting on my laptop between Windows 7 and Windows 8. You know how it is, you get comfy with one operating system and then another version comes out, and you’re like “Is it going to be any good?”, “I’m going to have to reinstall all of my stuff, again…”, etc…

My default was set to Windows 7. Now that I’ve been using Windows 8, I hardly ever go back into my Windows 7 partition. So, now I have a problem…

How do I change the default boot OS in the dual boot menu?

Its actually quite simple; use msconfig.exe – the System Configuration Utility. Its already on your computer.

After launching msconfig.exe;

  • navigate to the Boot tab,
  • select the new preferred OS,
  • click on the “Set as default” button, and
  • finally click on the OK button (see below).
msconfig.exe Boot tab options

System Configuration (msconfig.exe) Boot tab options

You may need to restart your computer for the settings to take effect (as was my case).