Sony Vaio Pro 13 Ultrabook – Audio over HDMI

Background:

Purchased a great Sony Vaio Pro 13 ultrabook with excellent hardware running Windows 8 and now updated to 8.1. The Intel® HD Graphics 4400 hardware controls the HDMI output and the audio over the HDMI output.

Issue:

Using the built-in HDMI output provides video, but no audio. Also, unable to locate audio options for HDMI in the Sound settings control panel of Windows 8.1. The Sony Vaio update tool confirms all the latest software drivers and other patches have been installed, but the issue of no audio over HDMI remains.

Solution:

After reading through many online posts and blog articles, the root cause appears to be related to the specific Intel Graphics Drivers being used by Sony on this specific model laptop. The Sony Vaio update tool confirmed that the Intel Graphics Drivers 10.18.10.3304 with a date of 9/9/2013 is the latest version. A community post on Sony’s forum shows that other people with a Sony Vaio Pro 13 laptop also experience no audio over HDMI, but they were able to resolve the issue by downloading updated Intel Graphics Drivers from a link on Sony’s web site: http://dlv.update.sony.net/pub/vaio/download/EP0000317186/EP0000317186.exe. The newer Intel Graphics Drivers are version 15.33.5.64.3316 with a date of 10/4/13.
After installing these “updated” Intel Graphics Drivers, I’m able to receive audio over the HDMI connection and I’m able to adjust that option in the Sound settings of the Windows 8.1 control panel.
The only potential concern might be that Sony does not provide future updates for the graphics drivers as my version might be out of sync with the version expected by the Sony Vaio update tool.

Sources:

Community post and thread on Sony’s forum
Alternative update drivers from Sony – untested

Posted in Consumer, Technology Tagged with: , , , , , ,

Ubuntu – VirtualBox Repository Configuration

Background

VirtualBox is a great product and has routine updates. Setting up the repositories for automatic updates and installs seemed to be more challenging than most other software packages.

Issue

Originally, after following the simple directions on VirtualBox’s web site, I received this error:

"Error: W: Failed to fetch http://download.virtualbox.org/virtualbox/debian/dists/precise/Release Unable to find expected entry 'contrib/source/Sources' in Release file (Wrong sources.list entry or malformed file)".

I read that by following VirtualBox’s directions, two resposities were added, one for software and one for source code, but as the source code isn’t distributed from Oracle in the respository, it should be disabled.
After disabling the respository, I still wasn’t seen the latest update and had to further research the issue.

Solution

I found the most comprehensive solution on a Ubuntu community page, which gave one long command that performs all the correct steps to properly setup the VirtualBox repository:

sudo sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free' > /etc/apt/sources.list.d/virtualbox.list" && wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add - && sudo apt-get update && sudo apt-get install virtualbox-4.3 dkms

The above commands add the VirtualBox repository download link for the distribution’s specific name (lsb_release -cs) to virtualbox.list, then downloads the public key to verify the authenticity of the VirtualBox downloads, adds the key to local storage, refreshes the package list and installs the latest version of VirtualBox plus DKMS for keeping the modules updated.

Sources

Remove sources from repository list
Comprehensive solution
VirtualBox Directions

Posted in Technology

Chrome – Recently Visited Tabs Disappeared

Background:

Google Chrome is very good at maintaining a history of open tabs, which allows for a great multitasking web browsing experience.

Issue:

Since Chrome frequently and correctly restores tabs, many users might not realize a strong dependence on this feature until it breaks. Over the last three years, there have been only a few occasions when Chrome has crashed and wasn’t able to successfully restore the previously opened tabs. After building a dependence on always having the same tabs restored, suddenly not having access to these tabs can be devastating.

Solution:

Chrome stores the currently open tabs as well as the last session’s open tabs in a few important files labeled: Current Session and Current Tabs as well as Last Session and Last Tabs. On Ubuntu, these files are stored in the local user’s home directory.

~/.config/google-chrome/Default

If Chrome isn’t displaying the correct tabs from the last sessions, a quick fix is to rename Last Session and Last Tabs to Current Session and Current tabs, then restart Chrome.
If that quick fix doesn’t work, the issue might be more serious as Chrome only keeps track of the current session and one previous session. To extend the history, routine backups can be kept and these Session and Tabs files can be restored from a backup.

Posted in Consumer, Technology Tagged with: , , , , , , , ,

WordPress – Allowed Memory Size Exhausted

Background:

WordPress is a great blogging platform that has many powerful features. The hosting environment WordPress operates under can provide constraints and limitations.

Issue:

After upgrading a plugin for WordPress, I immediately encountered the error, “Fatal error: Allowed memory size of x bytes exhausted in…php on line x). All WordPress web pages would display the same fatal error.
A user might expect, that if WordPress is encountering a fatal error with a plugin, the plugin would be disabled. This process is not automated.

Solution – Short-term:

Disabling the WordPress plugin required manually editing the WordPress database and disabling all plugins. Under the table containing the name “options” and under the column named “option_name” with the value of “active_plugins”, I erased the option_value. The option_value contains a setting of which plugins are activated and which are not. By removing the values in option_value, all plugins will be disabled. This approach allows plugins to be re-activated one by one until the fatal error is encountering, thus allowing the troubling plugin to be identified.
MySQL database command to view the option_value:

SELECT * FROM `options` WHERE option_name='active_plugins'

MySQL database command to reset and disable all plugins:

UPDATE `options` SET `option_value`='' WHERE option_name='active_plugins'

Solution – Long-term:

WordPress is powered by PHP and hosting environments set limits on the amount of memory PHP can consume for each customer or instance. If WordPress is legitimately in need of more memory, it will be best to increase the PHP memory limit for the user or instance. The method of increasing the memory limit varies based on the way PHP has been configured on the server. Some common solutions are to add or edit a file called php.ini or php5.ini with a line, “memory_limit = 128M”. Common values for the memory limit include: 32M, 64M, and 128M.
For a shared hosting environment, the most reliable approach is to contact the system administrator.

Conclusion:

When encountering a fatal error involving memory consumption, a likely root cause could be a plugin. The easiest route to identify whether a plugin is the root cause is to disable all plugins. If disabling all the plugins resolves the memory exhaustion issue, re-enabling one-by-one will identify the offending plugin.

Sources:

Fatal error: Allowed memory size exhausted
How To Disable All WordPress Plugins From The Database?

Posted in Consumer, Technology

Dr Martens Great Customer Service

Background:

I’ve purchased and worn Dr. Martens shoes over the years as they’ve proven to be very durable. Although the prices are sometimes higher than other shoes, I’ve found that the shoes last for a long time. In addition, I found the soles provide excellent traction on slick and wet surfaces, as well as good traction on icy surfaces!

Issue:

During the winter of 2014 I had worn a pair of Dr. Martens that were a few years old, but in great shape. The shoes, by far, had the best traction in snow and ice. One morning, when I was putting on the shoes, I noticed the outside rubber of the soles from the toe to the middle of the foot was cracked, on both sides of the shoe and on both shoes. The crack was serious enough that a yellow material inside the sole was exposed and seemed impossible to easily mend. I was very surprised as I’ve never encountered this type of issue before and I’ve had various Dr. Martens shoes for many years and used them in many different climates.

Solution:

I reached out to Dr. Martens customer relations department via email, [email protected] I attached a few pictures of the issues with the shoes, as I found it hard to describe and hard to believe. They offered to inspect the shoes for manufacturer defects if I was willing to pay the shipping fees to send the shoes to Portland, OR. After paying roughly $25 for the proper sized box and shipping, I waited three weeks. I didn’t hear back from Dr. Martens until I found a box at my door. Inside was a pair of brand new shoes in the most similar style to my previous pair!

Conclusion:

Although the communication from Dr. Martens was minimal, I was very impressed to receive a brand new pair of Dr. Martens without any charge!

Posted in Consumer Tagged with: , ,

Android – Detect Root Access from inside an app

Background

Google Wallet used three methods to determine whether an Android device had root access configured. Google Wallet used to mark a device as “Unsupported” if root access was detected on the Android device. The code used to implement the root detection methods was reversed and posted here on pastebin.com.

Overview

Three methods were used:
1) Check if the “su” command was successful
2) Check if the file “/system/app/Superuser.apk” exists
3) Check if the system OS was built with test-keys
If any of these three methods were true, Google Wallet would mark the device as “Unsupported”.

Code Analysis

First method – Execute “su” command

The first method created an interface to the environment, where the app was running, through getting a singleton instance by invoking getRuntime() and passing the “su” command. If an IOException error was not encountered, the command was determined successful.

  private boolean canExecuteSuCommand()
  {
    try
    {
      Runtime.getRuntime().exec("su");
      i = 1;
      return i;
    }
    catch (IOException localIOException)
    {
      while (true)
        int i = 0;
    }
  }

Second method – Check for apk

The second method created an “abstract” representation of a file by using the absolute path and filename to the most popular Superuser application. A call would be made to this representation of the file to check whether the file exists. If the file exists, the command was determined successful.

  private boolean hasSuperuserApk()
  {
    return new File("/system/app/Superuser.apk").exists();
  }

Third method – OS built with test-keys

The third method would extract the operating system build information from a system properties file (/system/build.prop). The extracted build tags information was searched for the phrase “test-keys” and if “test-keys” was found in the build tags information, the command was determined successful.

  private boolean isTestKeyBuild()
  {
    String str = Build.TAGS;
    if ((str != null) && (str.contains("test-keys")));
    for (int i = 1; ; i = 0)
      return i;
  }

Summary method – Determine whether a device is rooted

The final method gathered the results from the prior three tests and if any of the three test results were successful, would return true, indicating the device is rooted.

  public boolean isRootedPhone()
  {
    int i = 0;
    if (!this.mClientConfigurationManager.getClientConfiguration().isRootedPhoneDetectionEnabled());
    while (true)
    {
      return i;
      if ((!isTestKeyBuild()) && (!hasSuperuserApk()) && (!canExecuteSuCommand()))
        continue;
      i = 1;
    }
  }
Posted in Technology Tagged with: , , ,

Android – Checking for Nexus 5 Availability

Saw a great GitHub Gist shared on twitter by @pof for using crontab and curl to check for the Google Play page of the Nexus 5. I added a few tips on getting everything setup for those who might not have postfix running or used crontab recently.

Everything is also on my Gist, which I forked from poliva and added the same tips in a comment: https://gist.github.com/joeykrim/fc0dd9f25dd4cfe55438

Setting up postfix to work with Google Apps: http://blog.bigdinosaur.org/postfix-gmail-and-you/

bash script forked from poliva:

#!/bin/bash
URL="https://play.google.com/store/devices/details?id=nexus_5_32gb"
EMAIL="[email protected]"
mkdir -p /tmp/googleplay/
rm /tmp/googleplay/after 2>/dev/null
mv /tmp/googleplay/now /tmp/googleplay/after 
curl "${URL}" -o /tmp/googleplay/now
len=`diff /tmp/googleplay/now /tmp/googleplay/after |wc -l`
if [ $len != 0 ]; then 
        echo "${URL}" > /tmp/content.txt
        cat /tmp/googleplay/now > /tmp/che.html
        /usr/bin/mutt -x -s "Nexus5 available on GooglePlay" -a \
                /tmp/che.html -- ${EMAIL} < /tmp/content.txt
fi

Setting the bash script as an executable for crontab: chmod +x nexus5.sh

Good guide on crontab: http://www.thegeekstuff.com/2009/06/15-practical-crontab-examples/
Use the following line for crontab to run the script every 5 minutes:

*/5 * * * * /home/mydirectory/nexus5.sh
Posted in Technology

DataTables – Default sorting by the table column header class name

DataTables is a jQuery Javascript library plug-in to convert static html tables (including dynamically generated) into dynamically viewable and sortable tables. The advantage to using this plug-in is that the end user is given control over viewing and sorting the information presented in a table.

There is one feature which I wanted to implement but had a difficult time finding the exact solution. I wanted to set the default sorting for one specific column. The function, aaSorting, handles this but requires the use of an integer indicating the location of the column header. The downside to using fixed integers is that if the column headers change at some future point, the sorting could break then requiring the fixed integer to be updated. Why can’t this be dynamic and rely on a class name for the column header, instead of a fixed integer?

The author of DataTables addresses this question and feature in a post, that also includes a work-around to accomplish setting the default sorting by using the table column header (th) class value. The author also posts a live example.

In the end, the workaround code is:

    "aaSorting": [[ $('#example thead th.default_sort').index('#example thead th'), 'asc' ]]
Posted in Technology

Top 15 U.S. Business School Rankings, Tuition Costs and Salaries Charts

The below charts are for the top 15 U.S. business school MBA programs based on an average of rankings from four sources: US News 2012, BusinessWeek 2012, Financial Times Global 2013, and the Economist 2012
For a more consolidated version, view the top 6 U.S. business school MBA programs.

Bar Chart showing the average ranking from four sources: US News 2012, BusinessWeek 2012, Financial Times Global 2013, and the Economist 2012 (lower is better)

Bar Chart showing the total expense for 2 years of tuition (in USD) using 2012-2013 data

Bar Chart showing the average 1st year salary (in USD) without bonus using 2012-2013 data

Bar Chart showing the revenue/expenses ratio. Revenue being defined as the 1st year salary without bonus. Expenses being defined as two years of tuition costs. The break-even point is 1. Values greater than 1 break-even after the first year of revenue. (Larger value is better)

Posted in Consumer

Top U.S. Business School Rankings, Tuition Costs and Salaries Charts

The below charts are for the top 6 U.S. business school MBA programs based on an average of rankings from four sources: US News 2012, BusinessWeek 2012, Financial Times Global 2013, and the Economist 2012
Top 15 U.S. business school data

Bar Chart showing the average ranking from four sources: US News 2012, BusinessWeek 2012, Financial Times Global 2013, and the Economist 2012 (lower is better)

Bar Chart showing the total expense for 2 years of tuition (in USD) using 2012-2013 data

Bar Chart showing the average 1st year salary (in USD) using 2012-2013 data

Bar Chart showing the revenue/expenses ratio. Revenue being defined as the 1st year salary without bonus. Expenses being defined as two years of tuition costs. The break-even point is 1. Values greater than 1 break-even after the first year of revenue. (Larger value is better)

Posted in Consumer Tagged with: , , , ,

Android – Google Play issue: “your device isn’t compatible with this version”

At some point in the last few months changes were made to either or both the ADT plugin for Eclipse and Google Play that rendered my most recent Android application updates “incompatible” with tablets.
After doing a bit of research, I was able to locate 3 items that after adjusting in my applications resolved the new “compatibility” issue with my applications distributed through Google Play on tablets.

1) I added the below lines to the AndroidManifest.xml file. The lines explicitly declare support for all screen sizes, especially the xlargeScreens for tablets.

<supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"></supports>

2) Adjusted the section of the AndroidManifest.xml file from:

<uses-sdk android:minSdkVersion="4" targetSdkVersion="8"/>

to

<uses-sdk android:minSdkVersion="4"/>

3) Ensured that there was a drawable-xhdpi folder under the res directory that at least had the Android application icon.

After making these three changes, Google Play restored “compatible” for my applications with tablets.

The most frustrating part of the experience is that Google Play gives no indication during the application upload and publishing process that it will prevent tablets from using the application.Due to this lack of transparency, the issue can’t be identified until the application update has already been published and made public for users on tablets.

Update on June 3rd 2013: For the next update to the applications, I might try adding back in the targetSdkVersion to see whether or not that impacts tablet support in Google Play. As mentioned in the comment below, and I do agree, that removing/adding targetSdkVersion shouldn’t impact tablet support.

Posted in Technology Tagged with: , , , , , ,

OCZ Vector 256GB SSD AES 256-bit Encryption Technical Details

After previously posting a summary of my research around the best options for a well priced high performance and secure 256GB SSD drive, I attempted to gather as much detail as possible around the encryption provided on the OCZ Vector 256GB drive.

The official documentation for the OCZ Vector 256GB drive used to state, “Data Encryption: 256-bit AES-compliant, ATA Security Mode Features”. This information has been removed within the last week and I inquired about this below. In addition, the previous official documentation was vague and didn’t provide much technical detail. With the help of Dr Charl Botha and his blog, SSDs with usable built-in hardware-based full disk encryption, I was able to hold a very technical conversation with an OCZ Technology Support representative, Eric Von Stwolinski, regarding the AES encryption implementation on the OCZ Vector 256GB drive.The full conversation is below.

In the end I’ve found the lack of technical details and current conflicting information to be confusing. The overall experience has been slightly frustrating as no definite conclusion can be drawn.
If you have any feedback or ideas, feel free to post them in the comments.

Apr 23rd, my original question:
“1. Does the encrypt its AES keys with the ATA password?
2. Is the ATA password stored as a non-reversible hash on the firmware?”

Apr 23rd, Eric Von Stwolinski:
“The drive does support 256-bit AES. It is enabled by setting an ATA level password.
Once a password is set the drive is completely inaccessible until the password is provided. There is no master password for the drive or any way to access the drive other than to supply the correct password once it is enabled.”

Apr 24th, my reply:
“Is the AES key, that is used to encrypt the data on the drive, encrypted using the ATA password?”

Apr 24th, Eric Von Stwolinski:
“It uses AES encryption, but this feature is enabled and used by setting the ATA password on the drive.

If no ATA password is on the drive then the AES encryption is inactive. Only when an ATA password is applied to the drive is the AES encryption used.”

Apr 24th, my reply:
“Unfortunately, your last response doesn’t directly answer my question. I’ll repeat and rephrase my question. Thanks for your assistance in clarifying this important point for me.
Repeat: ‘Is the AES key, that is used to encrypt the data on the drive, encrypted using the ATA password?’
Rephrase: I understand that the AES encryption is only activated once the ATA password has been applied. My question is about how the ATA password is applied in relation to specifically the AES encryption key. AES encryption requires a key to encrypt and decrypt the data. The handling of this AES key is the focus of my question. Is the AES key itself encrypted using the ATA password?”

Apr 25th, Eric Von Stwolinski:
“The ATA password is the AES key.
The key for AES is enabled, disabled, or set using the ATA level password function. If an ATA password is set then AES is enabled, and the key to unlock the drive is the ATA password.
This means the ATA password must be provided every time you want to access the drive or if you want to change/disable the password.
Any attempt to access the drive without providing the ATA password would require getting through AES 256 bit, which isn’t possible to do with currently existing computers.”

Apr 29th, Eric Von Stwolinski: “The notes about AES support are just on the product page for the Vector drive:
http://ocz.com/consumer/vector-7mm-sata-3-ssd”

Apr 29th, my reply: “Hi Eric,
I have two follow-up questions. I do appreciate your assistance is sorting the AES encryption on the OCZ Vector SSD!
1) The product detail page you linked is very vague only saying, “256-bit AES-compliant, ATA Security Mode Features”.
Is there a more detailed public resource that provides the same level of detail you’ve provided regarding the AES encryption key and relation with the ATA password?
2) Regarding your previous comment two responses ago, “The ATA password is the AES key.” If this is true, then changing the ATA password will change the AES key, since they are the same. The current data on the OCZ Vector SSD, which was encrypted with the prior key, can’t be decrypted with the new/changed key, rending the current data unreadable? To summarize, you’re saying if the ATA password is changed, the current data on the OCZ Vector SSD is lost?”

Apr 29th, Eric Von Stwolinski: “We have no further documentation about the drive’s security features. This is only a consumer grade drive. Our enterprise grade drives have much more documentation available. If you are looking for a high security drive I strongly recommend looking into an enterprise grade drive.
If you wish to destroy all information on the drive forever, that can be done using the secure erase function in the toolbox utility. This is the only way to reset and wipe the drive. A secure erased drive is not recoverable by any means.”

Apr 29th, my reply: “Hi Eric,
Thanks for clarifying the documentation. I’m still not clear on my previous follow-up question. I’ll rephrase and attempt to clarify.
Is it true that changing the ATA password will render the data on the drive unreadable or inaccessible?
This is based on your comment that the “ATA password is the AES key”. If this is true, changing the ATA password would change the AES key. Without the previous AES key (previous ATA password) that the data was encrypted with, the drive can’t decrypted the stored data.
Can you confirm that changing the ATA password makes all data, prior to the ATA password change, on the drive unreadable or inaccessible?”

Apr 30th, Eric Von Stwolinski: “Changing or removing a password will not wipe out all information on the drive. That can only be done by a secure erase using the toolbox.
Forgetting a password will render the drive inaccessible and all data is lost, but merely changing or removing the password (which requires that the correct password is first supplied) will not destroy any information on the drive.”

May 2nd, my reply: “Hi Eric,
Thanks for all the clarification and assistance. I was reviewing all the information you’ve provided and when I accessed the link you gave to the OCZ Vector Specifications page, http://ocz.com/consumer/vector-7mm-sata-3-ssd/specifications, I see the section that previously mentioned, “Data Encryption: 256-bit AES-compliant, ATA Security Mode Features” is no longer listed on the page. I can’t find any mention of AES-compliant or ATA Security Mode Features on the official page.
Can you confirm you aren’t able to view this on the official link you provided and help me understand why this was removed? Has official support for the 256-bit AES-compliant encryption and ATA security mode features been dropped?”

May 2nd, Eric Von Stwolinski: “I’m unsure why it was changed. It may have been changed due to firmware updates.
Please note that while the controller is capable of 256 AES, it is not intended to be a primary feature of the Vector drive.
Our enterprise grade drives are designed and built with a much wider range of features, including greatly increased write endurance as well as security and monitoring features.
http://ocz.com/enterprise”

Posted in Consumer, Technology

The Best 256GB SSD Drive on the market

This is a high-level summary of the research I’ve done with the time I was able to dedicate. There is potential for much more in-depth research requiring a larger time commitment. Feel free to leave helpful comments!

There are three categories important to my research: Performance, Encryption and Price.

Performance

Tom’s Hardware provides a great, thorough and detailed listing of various performance benchmarks. The top five 256GB SSD drives as listed by Tom’s Hardware are:
1) OCZ Vector
2) Plextor M5 Pro
3) Samsung 840 Pro
4) OCZ Vertex 4
5) Corsair Neutron GTX

Encryption

To help demystify the encryption features on these SSD drives I found two extremely helpful and detailed blog postings: SSDs with usable built-in hardware-based full disk encryption and Locking and unlocking an HDD with Dell Bios ATA password with hdparm.
The results from the SSDs with usable built-in hardware-based full disk encryption blog leave only one set of SSD drives that are known to have properly implemented hardware level encryption, the Intel series 320 and 520 SSD drives. Unfortunately, the Intel SSD drives aren’t on the top 5 list from Tom’s Hardware performance page and none of Tom’s top 5 SSD drives are mentioned in the usable built-in hardware-based full disk encryption blog posting positively. The OCZ series of drives are listed explaining that they more than likely do not properly implement the hardware disk-level encryption.
I reached out to OCZ support regarding the encryption provided on their OCZ Vector 256GB drive and with assistance from Dr Charl Botha, the author of the SSDs with usable encryption blog post, I was able to ask some great questions. As the full conversation turned out to be quite long, I’ve put it in a separate blog post titled: OCZ Vector 256GB SSD AES 256-bit Encryption Technical Details.
The end conclusion is that OCZ probably does properly implement the built-in hardware-based full disk encryption, but we don’t know for sure. The ideal confirmation would be provided by official documentation OCZ provides with the SSD drive.
If you want to reach out to OCZ, or any other manufacturer and confirm, feel free to leave an update in the comments!
The second helpful blog posting, Locking and unlocking an HDD with Dell Bios ATA password with hdparm, provides a great step-by-step walkthrough of the commands to execute using hdparm and the SSD to lock and unlock the drive.

Price

There are two commonly trusted online retailers with a reputation for competitive pricing, Newegg and Amazon. To quickly research other competitors, a great tool is a simple search done through froogle.com (Google’s product search), which usually shows a good listing of competitors.
The OCZ Vector is offered for $265 at Amazon and $270 at Newegg, but with a recent 15% off promotion at Newegg, the price comes to $230.
The Samsung 840 Pro is offered for $220 at Newegg and $230 at Amazon.

Conclusion

The best 256GB SSD drive currently on the market that possibly offers proper hardware disk-level encryption and has the most competitive price is either the OCZ Vector with promotion discount for $230 at Newegg or the Samsung 840 Pro for $220 at Newegg.

Posted in Consumer, Technology

Ubuntu – How to clean up kernel images and header files

After every kernel upgrade on Ubuntu, the prior kernel image and header files remain. Personally, the most common usage for these prior kernel files is to revert to a prior kernel version when I’ve experienced issues with the current one.

I found over 2 GBs of older kernel images and header files taking up space, which I didn’t plan on using. For those who want to clean up prior (old) versions and free up space on their drive, below are some great and simple steps. These steps were provided by a great blog post here and I gleaned a more detailed approach from a comment on the blog post.

To start, the following terminal command will gather a list of all the linux kernel header and images currently installed:

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' >/tmp/file

To review the list of files, view the outputted information in /tmp/file using a text editor, such as:

vi /tmp/file

To send this list directly to the package manager to have all items on the list removed, use the following terminal command:

cat /tmp/file | xargs sudo apt-get -y purge

I was able to free up a few GBs of space from prior kernel images back to 2.6.*.

Note: Once the kernel image and header files are removed, the system can not revert to that prior kernel. Only remove kernel images and header files for kernels which will not be required. Leaving 2-3 prior versions of a kernel could be considered a safe backup practice.

Posted in Technology

WordPress – Locating the Google Authenticator Login Token

I accidentally wiped the data on my Android device losing all my Google 2-factor authentication tokens.

Using the Google Authenticator plugin for WordPress by Henrik Schack meant I was now unable to login to my blog. In order to login to my blog, I would need to either erase the plugin removing the 2-factor authentication (rm wp-content/plugins/google-authenticator/), or obtain the secret key and add the secret key back to the Google Authenticator application on my Android device. Rather than erase a plugin I wanted to use, I started searching for the key. Unfortunately, I wasn’t able to easily find this information.

I manually started searching through the WordPress database and found the secret key under the usermeta table in the field called googleauthenticator_secret. Providing this key to the Google Authenticator application allowed the application to start generating the login tokens again and allowed me to log back into my blog!

Hope this helps somebody else in the same situation!

Posted in Technology

Dell Ultrabook XPS 13 Developer Edition – Ubuntu 12.04 – Project Sputnik

Background

On Friday, November 29th, Dell made the Ultrabook XPS 13 Developer Edition available for order initially at $1549 and then later correct the price to $1449, bringing the price below the comparable Windows 8 version.
At first impression, this product appears amazing. The open sourced drivers, software available on github page, cloud focused tools to quickly pull down the correct developer tool, all the incorporated community feedback/support, and the focused hardware specifications.
Over the years, the main reason myself and others I know have purchased Dell products are two-fold. One, Dell has built a solid reputation for producing quality products and providing decent warranties. Two, Dell has historically provided the customer many options for customizing the hardware. This offering comes with reason number one, but does not come with reason number two. I will focus this post on reason number two.

Dell claims to offer a “Developer Edition” Ultrabook. There is a fine line between a marketing tag line and the real title/focus/goal of a product. If a product is marketed for developers, the developer should be able to customize the hardware. In the course of developing software, every developer runs into hardware limitations, whether through an accidental infinite loop or intentionally through stretching a system’s capacity. Developers write software confined inside the limitations of hardware. To produce a product aimed at developers without allowing hardware customization is essentially one way to tie the developer’s hands.

There are certain hardware configurations that can be customized without impacting the drivers or software provided on the Ultrabook. At minimum, both the amount of RAM and the SSD capacity can be adjusted without requiring different software drivers. In some cases, the display, such as offering a 1080p option in addition to the current 720p, can be adjusted without requiring different software drivers.

Conclusion

Dell should rely on the roots they built off of that especially included the ability for consumers to affordable customized product hardware. Dell should at least provide an alternative configuration with, at minimum, more RAM, a smaller SSD or a higher resolution display. I’m sure many more developers would be willing to follow through and purchase this product if Dell allowed the developers the direct ability to select hardware components.

Competition

I’ve only come across two decent competitors in this niche market:
ZaReason UltraLap 430
Apple MacBook Air

Dell Ultrabook XPS 13 Developer Edition Hardware Specifications

As of Nov 29th 2012 – $1449
Initial Release Hardware Details:
3rd Generation Intel® Core™ i7-3517U (4M Cache, up to 3.0 GHz)
UBUNTU Linux 12.04
13.3″ HD 720p
8GB2 DDR3 SDRAM at 1600MHz
256GB Solid State Drive
Intel HD 4000
2.99 lbs

Links

Dell Ultrabook XPS 13 Laptop, Developer Edition – Ubuntu 12.04 LTS
Comparable Ultrabook through ZaReason
Comparable MacBook Air
Comments on Barton George’s Blog
Sputnik Github Page
Ubuntu Image and PPA information
Dell Forum for Project Sputnik

Posted in Consumer, Technology Tagged with: , , , , , , , , , , , ,

Nike+ Review – Running Applications for Android

Background
Having spent a substantial amount of time running outdoors, there were always three main metrics I have wanted to know during and after a work out.
1) Overall time
2) Overall distance
3) Pace (Time per distance)

Longstanding Resolution
For the first, overall time, I could simply use a watch. Subsequently, I have always worn a watch in order to keep, at minimum, a rough gauge of time I spent on any given run. Based on experience and recorded times, I could eventually roughly deduce the second, overall distance and also approximate the third, time per distance. Other than running on a track or treadmill, obtaining the second and third metrics, overall distance and time per distance have always been very difficult. If a run took place only on city streets then afterward by driving the route and watching the odometer a fairly accurate distance could be determined.
Without being able to drive a car along the exact same route of a run, there was no accurate method to determine the distance and therefore deduce the pace. For the majority of running situations using a car is at minimum an inconvenience and in many situations an unreasonable solution. Luckily, technology has changed all of this.

New Resolution
Now, using any smartphone and a free application from Nike called Nike+ Running, the three metrics I have always wanted are easily available. While running the Nike+ application uses the smartphone built-in GPS radio and Google Maps to precisely monitor and report time, distance and pace. Not only is the application able to report these three important metrics at the end of a run, but the application also reports these three metrics throughout the run.
As if having access to these three metrics during and after the run wasn’t enough, Nike also allows this information to be privately or publicly uploaded to their server for retrieval at any future point in time. In addition, the Nike+ application provides summarized accomplishments based on the performance of all saved runs such as, “This was your farthest run at 4.29 miles” or “This was your fastest 5K at 27:02″. The Nike+ application goes even further and provides challenges based on previous runs, such as “Beat your Farthest Run on 11/05/2012 of 4.29 miles”.

The Nike+ application also has an equally feature filled and useful matching web site. On the web site, run details have be viewed on a larger screen allowing for a more detailed analysis of pace, distance and elevation. There is also an interesting feature showing predetermined Nike+ approved running routes in the user’s neighborhood allowing the user to indirectly compete against other runners.

As a side note, the Nike+ application allows a pair of shoes to be added and tagged for each run. This allows Nike+ to keep mileage history on shoes allowing for more precise shoe replacement timing.

Downside
I have only come across two downsides. First, I found the Nike+ web site used to allow users to challenge each other, but Nike states this feature has been disabled while they work to improve it.
Second, the Nike+ application appears to have a music player but essentially little to no documentation on how the user player or playlists operated. In the meantime, I’ve been using the offline mode in Google Music which has worked plenty well.

Conclusion
For a free application, Nike+ provides incredible features and service both in the Android application and on the web site. For any runner, I highly recommend at least using this application once as the provided knowledge is powerful and addictive!

Resources
Nike+ Running Android application
Nike+ Web site
Temporary Disabled Challenge feature on the Nike+ Web Site

Posted in Consumer Tagged with: , , , , , , , , , , , , , , , , ,

WordPress – Add and Properly Display Code

Background
While attempting to paste java code from an Android application into a WordPress blog, I discovered WordPress ignores all the white spaces and allows the text to run over the margins. Adding the <pre></pre> html tags respects the white spaces but does not respect the margins.

Solution
In the end, I added a few lines of code to the theme’s style.css file that force the <pre></pre> to respect whitespace and the theme margins. Below is an example of the adjusted pre tags and also contains the actual modifications to the style.css file.

Link
Blog by Greg Rickaby – Adjust WordPress to support proper code display

/* Code
------------------------------------------------------------ */

pre {
	background-color: #dbdbdb;
	font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
	font-size: 13px !important;
	font-weight: normal !important;
	font-style: normal !important;
	text-align: left !important;
	line-height: 20px !important;
	border-left: 3px solid #75DB75;
	padding: 10px;
	margin: 0 0 15px 0;
	overflow: auto;
}

pre::selection {
	background-color: #3399ff;
}

code {
	background-color: #FFFF9E;
}
Posted in Technology

Android – Added Follow Developer on Twitter Button

Background
There is a great piece of java code posted by koush on Github’s gist showing how to interface with the official Android Twitter application. The key was not only knowing the package name, but knowing the right extra information to add to the intent sent to the Twitter application.
The below code and two links below illustrate a simple method of firing off an intent loaded with the proper profile activity class name and screen name to pull up the user’s page in the official Twitter application. The second link shows how I added this to a custom Whats New dialog used in my applications.

Links
koush gist on github: https://gist.github.com/3087486
my gist on github with whats new dialog function: https://gist.github.com/3487283

Copy of my gist on github

    //Credits:
    //http://www.helloandroid.com/tutorials/how-display-custom-dialog-your-android-application
    //https://gist.github.com/3087486
    private void whatsNewDialog() {
        //requestWindowFeature(Window.FEATURE_NO_TITLE);
        //Dialog dialog = new Dialog(main.this);
        final Dialog dialog = new Dialog(this, R.style.NoTitleDialog);
        dialog.setContentView(R.layout.whatsnew);
        //dialog.setTitle(getString(R.string.app_name) + " v" + currentAppVersion);
        dialog.setCancelable(false);
        //set up Title
        TextView textWhatsNewTitle = (TextView) dialog.findViewById(R.id.whatsNewTitle);
        textWhatsNewTitle.setText(getString(R.string.mainTitle) + " v" + currentAppVersion);
        //set up text content
        TextView textWhatsNewContent = (TextView) dialog.findViewById(R.id.tvWhatsNew);
        textWhatsNewContent.setText(R.string.whatsNew);
        //set up image view
        ImageView img = (ImageView) dialog.findViewById(R.id.whatsNewRootIcon);
        img.setImageResource(R.drawable.icon);
        //set up Okay button
        Button btnOkay = (Button) dialog.findViewById(R.id.whatsNewBtnOkay);
        btnOkay.setOnClickListener(new OnClickListener() {
        @Override
            public void onClick(View v) {
                editor.putLong(PREF_WHATS_NEW_LAST_VERSION, currentAppVersionCode);
                editor.commit();
                dialog.dismiss();
            }
        });
        //check for Twitter application
        boolean twitterInstalled = false;;
        try {
            PackageManager packman = getPackageManager();
            packman.getPackageInfo("com.twitter.android", 0);
            twitterInstalled = true;
        } catch (Exception ex) {
            //ex.printStackTrace();
            twitterInstalled = false;
        }
        //set up Twitter button
        Button btnFollow = (Button) dialog.findViewById(R.id.followOnTwitter);
        btnFollow.setOnClickListener(new OnClickListener() {
        @Override
            public void onClick(View v) {
                // this is the intent you actually want.
                // grabbed this by hooking a debugger up to twitter and debugging into android framework source.
                // this let me inspect the contents of the intent.
                Intent i = new Intent();
                i.setClassName("com.twitter.android", "com.twitter.android.ProfileActivity");
                i.putExtra("screen_name", "joeykrim");
                try {
                    startActivity(i);
                }
                catch (Exception ex) {
                    // uh something failed
                    ex.printStackTrace();
                }
            }
        });
        //Log.d(LOG_TAG, "twiterinstalled: " + twitterInstalled);
        if (twitterInstalled) btnFollow.setVisibility(VISIBILITY_VISIBLE);
        //now that the dialog is set up, it's time to show it
        dialog.show();
    }
Posted in Technology Tagged with: , , , , , , , ,

Ubuntu – Rebuilding Software Raid 1 with dmraid

Background
Recently, I had two Seagate 1TB hard drives fail. One was 4 years old and the other was the 3 month old warranty replacement. Luckily, I had two of these hard drives setup in a RAID 1 configuration. Since I have an Intel chipset, I also have Intel’s support for software RAID. After having configured this in the BIOS, I setup the Operating System side of the RAID configuration in Ubuntu.

Second HDD Failure
After connecting the second refurbished HDD from Seagate and while booting, I entered the RAID controller setup. In this screen, I saw that the new hard drive was automatically marked as ready to be used to rebuild the RAID configuration. After confirming yes, I booted into Ubuntu 11.10. The software RAID automatically started rebuilding itself. There are two main commands to monitor and confirm completion of the rebuild status. The first, gives a detailed analysis of the current RAID setup: sudo dmraid -s -v. The second, gives a detailed progress report on the re-build status: sudo dmsetup status.

Conclusion
The two 1TB hard drives usually take a few hours to completely synchronize, 2.5 hrs in my case. The process is very simple and easy.

Main Commands Used:
sudo dmsetup status (display progress)
sudo dmraid -s -v (display overall raid status, mirror and ok or nosync)

*Update: A comment left by Arie Skliarouk says that a rebuild command needs to be issued, although I recall setting the rebuild status in the BIOS, this might be needed for some users. Example command: sudo dmraid -R isw_ebdfjfbgdj

Properly Working dmraid Status:

j@j:~$ sudo dmraid -s -v
*** Group superset isw_ebdfjfbgdj
--> Active Subset
name   : isw_ebdfjfbgdj_JRaid1TB
size   : 1953519872
stride : 128
type   : mirror
status : ok
subsets: 0
devs   : 2
spares : 0

Needing to be Rebuilt dmraid Status:

j@j:~$ sudo dmraid -s -v
*** Group superset isw_ebdfjfbgdj
--> Active Subset
name   : isw_ebdfjfbgdj_JRaid1TB
size   : 1953519872
stride : 128
type   : mirror
status : nosync
subsets: 0
devs   : 2
spares : 0

Rebuild Progress Status (569/14905):

j@j:~$ sudo dmsetup status
isw_ebdfjfbgdj_JRaid1TB2: 0 102400000 linear 
isw_ebdfjfbgdj_JRaid1TB1: 0 1851117568 linear 
isw_ebdfjfbgdj_JRaid1TB: 0 1953519880 mirror 2 8:48 8:32 569/14905 1 AA 1 core

Helpful Links
http://techie.org/Blog/2010/09/03/how-to-rebuild-intel-raid-isw-on-linux/
http://nitinsharma.info/linux/fakeraid-on-ubuntu-using-dmraid-part2/

Hard Drive Details:
Both 7200rpm 1TB Seagate drives
ST31000333AS (4 yrs old – Part of the Seagate Barracuda 7200.11 family)
ST31000524AS (2nd Refurbished Replacement)

Posted in Technology Tagged with: , , , , , , , , , , , , , , , , , , , , , , ,