Skip to content


Category: General Posts

It’s not often that we get to have a nice dinner out, and it’s so easy to forget how nice it is to relax and enjoy a quiet evening with just your significant other. This week, we took advantage of a great deal at the Grand Sierra Resort in Reno, NV to have a wonderful dinner. After a day at Northstar-at-Tahoe getting our snow legs back, we sat down at the back in a large booth. The lighting was very low and the the ceilings vanished overhead. Along the back and sides of the booth, tall curtains hung down and gave the impression we were sitting on a large stage. As the food was brought out, it felt like a well choreographed dance of flavor in our mouths. Even better was starting off with a very nice Graff Riesling.

Since we are both seafood fanatics, we wanted to sample the iced seafood sampler. But I wanted a better variety and we ended up ordering some different appetizers instead. Rays was never much of a scallop fan, but the pan seared scallops with pork belly changed her mind. The scallops were well seared on both sides but retained their juicy and tender middle. The pork belly was well seasoned and crispy on all sides. They sat on a small bed of arugula leaves. We also decided to be a little adventurous (and perhaps controversial). Since we had never had foie gras before, and due to its being banned in California, we decide to try it and see what the fuss was about. Well, the dish was absolutely heavenly. It tasted light, buttery and went very well paired with the baked apple and cinnamon cake. While it was an experience that we will both treasure, we probably won’t be seeking out this sinful dish soon. Our last appetizer was a simple prawn cocktail and it came with four large tiger prawns served on a dish with a splash of sauce on the side.

For our entree, we picked the filet and braised shallot. It was cooked medium rare and came with a selection of three sauces. With the waiter telling me what each sauce was made from, I didn’t realize that the cabernet reduction sauce was on the plate until the steak was mostly gone. I still had enough left to decide that the reduction sauce was the best of the bunch. Though the butter sauce was definitely a favorite as well.

I guess it wouldn’t do to describe how wonderful it was without a nice salivation inspiring photo.

I almost forgot, we finished off our meal with a divine strawberry and mint cheesecake!

I ran into a “There was a problem with reindexing process” with my recently upgraded Magento Community installation. This went from 1.6 to 1.7 and after digging in the command being run, “MAGE_ROOT/shell/indexer.php –reindex catalog_product_price”, I get some nice PDOException errors with a “Base table or view not found” message. It’s informative because it tells me that my catalog_product_index_group_price doesn’t exist.

Further digging resulted in finding this gem: Here you can find all the SQL structure commands used to create the different versions of the software.

So then it is just a matter of running the indexer, looking at the error, and fixing the table in question. These were the tables I had to recreate:


At this point I took the hint and recreated all the tables that started with catalog_product_index_price_. That fixed the issue for me so hopefully it will for you.

If you’re using NetBeans as your IDE of choice, you’ve probably run into a situation where it scans your project folders for changes and consumes an absolute ridiculous amount of CPU/Memory. The problem I found after much annoyance is that infinitely looped symlinks will cause NetBeans to scan very very hard for essentially nothing.

I had a folder which contained a symlink to itself. It’s hard to find, but here’s a quick script to do it in your project directories:

find . -type l -print -ls

That’s it! if you see any suspicious links that seem to go back on itself, try removing them or adding them to your ignore list.

If you’re thinking about buying anything on eBay, you might want to do a little research first. Checking their closed item search will give you a pretty good idea of what you should (or should not) be paying for the item you want. That is assuming you’re not looking for a one of a kind item.

Most items like iPods or macbook pro laptops are commodities and the pricing is therefore somewhat uniform. But scrolling thru that long list of (up to) 200 items with sold/unsold items makes it hard for you to get an idea of what you should be paying. Sure, you could try to remember the cheapest item you saw, or the 2 or three that seemed more reasonable. What if there was a better way to get some research on those items? Now there is! Just add the bookmarklet on this page to your toolbar and you can easily see what the run down on those listings are.

When you search for your item, try to get as specific as possible using negative keywords (-notThisKeyWord), category filtering, price range, and product specifications. This will help to make removing trash items much easier. Don’t make it too specific either because then you may leave out an item where someone listed it wrong (which usually results in a bargain buy). Once you’re happy with the closed item results, just click the bookmarklet in your toolbar and it will take you to the research tool page. Here is a screenshot of what it looks like: Tool screenshot

There are a few things you can do now. The three top boxes show you summary information. The first box shows the breakdown of number of sold vs unsold items and how many items were found. Currently the tool only takes the first page of data from your search, but I am planning to add a feature to allow multi-pages. The second box shows the average, minimum, and maximum sale price for sold items along with the standard deviation in the sample set. The third box is the same as the second except for unsold items. The minimum and maximum values are clickable and will filter the data table by that value. So if the minimum is $9.99, clicking it will filter out any prices not containing 9.99. You can sort on the price column to see the lowest/highest prices. Clicking on a row will select that row and you can remove it from the data set by then clicking “Delete Selected Row”. You can also select multiple rows by holding down the SHIFT key for your second click.

Using the standard normal distribution table, we can remove any prices outside of 1.645 standard deviations away. That removes the 10% of samples that are outliers both low and high. You can do this in one step by clicking the “90% Sold Range” or “90% Unsold Range”.

Create your own server certificate request:
openssl genrsa -des3 -out server.key 1024

Remove the passphrase (optional, but makes your apache startup much faster)
openssl rsa -in server.key -out server.key.unsecure

Create the signature request
openssl req -new -key server.key -out server.csr

Create your own Certificate Authority

openssl genrsa -des3 -out ca.key 1024
openssl req -new -x509 -days 365 -key ca.key -out ca.crt

Create this script to /tmp/ (Use this faq source)
## -- Sign a SSL Certificate Request (CSR)
## Copyright (c) 1998-1999 Ralf S. Engelschall, All Rights Reserved.

# argument line handling
if [ $# -ne 1 ]; then
echo "Usage: sign.sign .csr"; exit 1
if [ ! -f $CSR ]; then
echo "CSR not found: $CSR"; exit 1
case $CSR in
*.csr ) CERT="`echo $CSR | sed -e 's/\.csr/.crt/'`" ;;
* ) CERT="$CSR.crt" ;;

# make sure environment exists
if [ ! -d ca.db.certs ]; then
mkdir ca.db.certs
if [ ! -f ca.db.serial ]; then
echo '01' >ca.db.serial
if [ ! -f ca.db.index ]; then
cp /dev/null ca.db.index

# create an own SSLeay config
cat >ca.config <<EOT
[ ca ]
default_ca = CA_own
[ CA_own ]
dir = /etc/apache2
certs = /etc/apache2/certs
new_certs_dir = /etc/apache2/ca.db.certs
database = /etc/apache2/ca.db.index
serial = /etc/apache2/ca.db.serial
RANDFILE = /etc/apache2/ca.db.rand
certificate = /etc/apache2/certs/ca.crt
private_key = /etc/apache2/private/ca.key
default_days = 365
default_crl_days = 30
default_md = md5
preserve = no
policy = policy_anything
[ policy_anything ]
countryName = optional
stateOrProvinceName = optional
localityName = optional
organizationName = optional
organizationalUnitName = optional
commonName = supplied
emailAddress = optional

# sign the certificate
echo "CA signing: $CSR -> $CERT:"
openssl ca -config ca.config -out $CERT -infiles $CSR
echo "CA verifying: $CERT <-> CA cert"
openssl verify -CAfile /etc/apache2/certs/ca.crt $CERT

# cleanup after SSLeay
rm -f ca.config
rm -f ca.db.serial.old
rm -f ca.db.index.old

# die gracefully
exit 0

Sign your server certificate
/tmp/ server.csr

Move the Certificates to /etc/apache2/certs and the keys to /etc/apache2/keys
Edit your httpd.conf to include httpd-ssl.conf
And edit your httpd-ssl.conf to set the following directives correctly

SSLCertificateFile “/private/etc/apache2/certs/server.crt”
SSLCertificateKeyFile “/private/etc/apache2/keys/server.key”

Need a list of currency codes based on country? Try this:

or Google Search for country code to currency codes

Then using your javascript console:

var tb = document.getElementById('table_par');
data = tb.getElementsByTagName('TR');
data =, 2);
var output = {}; var country = null;

for (var i=0;i var tds = data[i].getElementsByTagName('TD');
if (tds.item(2) && tds.item(8)) {
if (tds.item(2).innerHTML != ' ') {
country = tds.item(2).innerHTML;
if (tds.item(8).innerHTML != ' ') {
if (output[country]) {
} else {
output[country] = [ tds.item(8).innerHTML ];

Here is the output:

Zero padding in BASH shell:
There are a couple of ways to pad integers with leading zeros in BASH. One way is to add a larger number and truncate the leading digit:
largeNumber=$(( $foo + $smallNumber ))
echo $zeroPaddedNumber

This displays: “00025″ the ${largeNumber:1} chops off the first character from 100025.

Another way is to use printf, but this creates another process and is more expensive in larger loops.
zeroPaddedNumber=`printf "%05d" $smallNumber`

Same results, but in larger loops will have slight performance penalty

Enforcing decimal for integers with leading zeros
Doing calculations with zero padded integers may provide inaccurate results. Specifically “00025″ is counted as octal in bash. To force bash to recognize it as a decimal number:

echo $(( $smallNumber + 1))
echo $(( $decimalNumber + 1))
echo $(( $hexNumber + 1))

The above prints “22″, “26″, and “38″. The “$(( ))” construct does arithmetic calculation and returns the value in base 10.

String substitution or substring search in bash variables
Sometimes you assign the output of a command to a variable, expecting it to hold some information. If the command failed or did return the expected values, you must check the values returned.

mylongstring="This is a really long string I want to check"
searchstring="I want"
if [[ ${mylongstring#*$searchstring*} != $mylongstring ]]; then
echo "'$searchstring' was found in '$mylongstring'"
searchstring="I have"
if [[ ${mylongstring#*$searchstring*} == $mylongstring ]]; then
echo "'$searchstring' was not found in '$mylongstring'"

I was able to convince my wife to allow me to purchase a Mac Mini yesterday. Her argument was that we have too many computers at home already and don’t need another one. That’s very true, we have way too many laptops and old PCs. Plus 2 IBM servers (or jet engines if they are on.) That is too much for a household of 4. My argument that we needed an always on machine able to handle backups for our numerous machines and serve up family photos won out in the end. We headed to the Apple store in Valley Fair and was able to go home with one immediately.

At home, I had a little bit of a hard time setting it up. The main problem was I had an old bluetooth keyboard (thanks Albert) and a bluetooth magic mouse. The Mini booted up fine but would not detect either device. I ended up having to pair and unpair the devices with one of my laptops, then leave the devices directly on top of the Mac Mini before they were able to be detected.

The mouse was detected first and I had a bit of trouble with the keyboard too, but ultimately it paired successfully and I was able to boot.

As far as getting it setup for remote access and Time machine backups, I will update detailed info when I finish that tonight.

The weather this entire summar and fall has been rather odd. We had really cold temperatures during June and July and caught a big stretch of warm weather in late August. Mother Nature even psyched out a pear tree I had planted this spring into thinking that it had already wintered. I got white pear blossoms on my grafted asian pear tree.

After waiting most of October and the first week of November thinking, “There’s no way Heavenly will open the slopes by Nov. 19th.” The first cold front of the 2010 winter has arrived. Clear blue skies have been replaced with a serious winter storm as shown by the picture below: .

That’s fine by me though. I have spent the last 5 years getting out of shape, and it’s high time for me to hit the slopes with a vengeance this season.

For anyone who still doesn’t have a season pass yet, Heavenly bought Northstar-at-tahoe and the $379 Heavenly pass is good for all three resorts (Sierra-at-tahoe is included too). If you want to save $20 on your Heavenly Season Pass, use the link above and submit your first name and email for a referral.

Update: Here’s a quick look at the aftermath after the weekend’s storm. .

I had an interesting experience this weekend when a Kenmore 106.5 fridge my uncle owned stopped cooling. The funny thing was, the freezer was working fine. After doing some quick google searches, it seemed that some other people were having the same problem around the same 4 year mark. After messing around with the damper and finding that it works fine, I pulled off the plastic backing in the freezer and noticed that the air flow was extremely low. That made me suspect that flow of air is blocked. Taking off the light bulb and removing 6 1/4″ hex screws let me remove the metal sheeting which covers the heat exchanger. As soon as I lifted the bottom of the sheeting, the fan noise significantly lowered and I knew that I had found the source of the problem. The bottom of the coils were frosted over completely and thus was blocking the air flow. We turned off the fridge and went to work with a hair dryer. Making sure to cover the bottom with some towels because I didn’t want the pan to overflow and ruin the flooring, we quickly defrosted the coils and the unit is now working fine.