Sunday, April 24, 2011

Mouse like Numberpad

The other day my number pad stopped working. Then I notice it was acting like a mouse and I remembered that I'd used this once before a long time ago. It can be handy if you are setting up a computer or trouble shooting things and don't have a mouse. Usually I prefer the number pad to act like a number pad and not a mouse. Here is how to toggle it back and forth press ctl-alt-numlock.

Monday, October 11, 2010

Link Shrink Adfly Service?

Has anyone else used the Adf.ly URL shrinking service before? Looks like an interesting service though it does cause you an extra click for users to get to you link. I found it as a referral in my Google Analytics data.

Thursday, October 7, 2010

Panoramic Eklutna Lake Mug

Just went on a bike ride along the Eklutna Lake near Chugiak and captured this wonderful panoramic view looking down the lake.

Monday, October 4, 2010

Rambling Code

I've been experimenting with Amazon S3 service for one of my latest projects and didn't see many examples out there so I thought I would share some code snippets. Being cheap I wanted trying to keep my storage costs down so I opted to use the reduced redundancy feature of S3. I was having trouble getting the change storage type function to work correctly when I discovered that the following code will work to reduce the storage space when you upload it. Here are two sample lines that will work to save you some money on S3.
To upload new objects with reduced redundancy set use the following line of code.

$result = $s3->batch()->create_object($bucket, $filename, array( 'fileUpload' =>$file, 'storage'=>'REDUCED_REDUNDANCY' ) );

To change existing objects redundancy setting .

$result = $s3->change_storage_redundancy( $bucket, $filename, 'REDUCED_REDUNDANCY' );

Here is how to list all of the objects in a bucket. Not recommended if you have lots objects.

$result = $s3->list_objects($bucket);
foreach( $result->body->Contents as $r ) {

   echo $r->Key;
}

I'm using the Simple PHP S3 Class. I hope you have found this useful.

Tuesday, June 1, 2010

Yet another postcard.

Check out the new postcard of Mt. Redoubt in the sunset. It appears that the mountain is on fire but it is only the setting sun positioned perfectly behind it.