Tuesday, December 30, 2008

Apache and PHP on OS X Leopard


As you may know, one method of controlling a Media Station (computer plugged into TV/Stereo, in this case my G4 Mac Mini) would be through a web interface. VLC offers a basic web-based interface but I am feeling froggy and want to try and build my own. In order to do so a web server will be needed as a method to control what is going on. Apache2 is built into OS X. Turning it on is a piece of cake. Under System Preferences - Sharing - you'll find the screen in which you turn on Apache:

Click this box and Apache is up and running on your machine. You can test this out by looking at http://localhost/ and you will see the stock Apache page. If you want to do this from the Terminal window, you can enter sudo apachectl start and enter the administrator password when prompted and the Apache server will start.

The files you want to serve up via Apache go here: //Library/WebServer/Documents

For my experiment I am going to be using PHP and mySQL. For details on installing and enabling PHP and mySQL on OS X, stay tuned...

Sunday, December 28, 2008

Cutting Cleaners Contains Clothing Costs


I am a dry cleaning junkie. I put every piece of work-related clothing in for cleaning for several reasons:

1. Lazy. Washing, pressing, starching, hemming, bringing in, and taking out are all time consumers. I always have much better things to do.

2. Results. I put in a shirt or pants and tell them "extra heavy starch" and I get a crisp, clean, good-looking shirt.

3. Space. Interestingly, I always have a load of clothes in for cleaning so that makes for more space in the closet.

Well, I've been paying for laziness with my hard-earned dollars, so I'm replacing the weekly dry cleaning trips with these:


I have eight years of experience with these tools so I'll just stop being lazy and embrace the DIY lifestyle that I am hoping to espouse on here.

How much money will I save? Well, I was having 5 shirts and 4 trousers a week in for cleaning and pressing with extra heavy starch. Take a look at how much that costs and you will see that the iron, sewing machine, and bottle of starch would be paid for in about 5-6 weeks (of course I am using straight dollars and not some fancy NPV formula). I will post pictures of some of my better hemming and alteration jobs. I can do this because I am secure in my masculinity.

Saturday, December 27, 2008

Sustainable Suburban Living

One way to save money and the planet is to grow your own food. We don't have much space on our small suburban San Diego plot but there are a few things that we currently do, and there are also plans for future sustainable suburban living.

Grapes
As you can see from the photo I took today, we have a few vines, various different grapes. In the past we have wound up eating about 20% of them. The other 80% wind up being consumed by friends, neighbors, birds, and ants. One reason for this is that they all come to season at the same time and we really don't have anywhere to store them. I can think of a really cool way to store the next batch but it will take some time, space, and equipment (read: Money). The area where I plant them doesn't have any irrigation, but I have a theory that there is water coming from somewhere because they do well every year without me watering them.


Macadamia Nut Tree

We have a macadamia nut tree in the front yard that produces nuts in which a majority of the nuts meet the same fate as the grapes. The are very difficult to crack, and each nut yields very little. They are, however, very expensive on the open market so I am hoping to collect them and consume a portion. The ones we don't eat could be traded on Craigslist for other fruits and vegetables.

One interesting item to note is that the crows in the area will pick up the nuts and lay them out in our driveway. They know that the car coming out of the garage will run them over, thereby making available the sweet macadamia nut flesh. It took us awhile to notice this. We would sweep the driveway clear of leaves and nuts and the next day there would be nuts crunching under our wheels a we pulled out of the garage. It took about a year to finally notice the crows laying them out in anticipation of a tasty snack. Interesting.

Chicken (Gallus Gallus Domesticus)
This is our urban chicken, Moonbeam. She was purchased about 4 months ago so we haven't gotten any eggs yet. She is a wonderful insect controller and she free-ranges in the backyard all day and only goes in the cage at night. She isn't crazy about going into a cage, but it keeps her from being a meal for one of the neighborhood cats, raccoons, possums, owls, or any number of predators looking for a tasty chicken meal. We did have another chicken, Sundance, but "she" turned out to be a "he" and started to crow in the morning. 3am in the morning to be precise. Determining the sex of a chicken has an 85% accuracy rate, meaning we had up to a 30% chance of one of them being a rooster when we bought them (15% chance of being a male, we bought two so 15 X 2 = 30%). Because having a chicken in the city is a gray area, we sent Sundance out to the country with a co-worker who has 17 other chickens in need of some loving. Chicken poop, for the record, is an excellent natural fertilizer. Because she eats bugs, grass, weeds, and some basic bird feed, her poop and her eggs are 100% natural.

I'll keep everyone updated on the status of our diminutive farming efforts as events warrant.

Thursday, December 25, 2008

The Housing Bubble

I found this funny in a sick way. It probably isn't funny if you understand what he is really saying. Lucky for me I got a D- in German:




This isn't the first comic treatment of this little known film (Downfall) but it is timely.

Family Tree

I set up a web page with some family tree stuff. Right now it's a skeleton, but I have plenty of information, photos, and stories. I have much of this information on Ancestry.com but the interface leaves much to be desired, and many of the folks I invited don't seem to visit much.

Wednesday, December 24, 2008

AppleScript via Terminal

I have been trying to come up with a viable remote control option for the computer connected to the TV. The Remote Admin tool is overkill, so I have been ssh-ing into the box and running AppleScript from the terminal:

sudo osascript -e 'say "[Hello, I am in your television]" using "Zarvox" '

I have a few options:
One is to run Apache on the Mac Mini turned Media Center and have a page with Javascript that calls AppleScript controls for Quicktime.

Another option is to run everything through Front Row. This is the really slick front-end from the AppleTV. The newer Mac Minis have a remote control that works awesome, but our older G4-based Mini doesn't have a remote, hence the need for some way to drive the interface.

A third option is to just be ghetto fabulous and steer through a mouse hooked up to the computer.

For now it has been a combination of options 1 and 3.


Apple Store UTC

I am posting this from the UTC Apple Store.  Definitely not the place to be on a budget.  The 30" LCD display is, however, quite beautiful.  
As is the Mac Pro plugged into it:


Santa, are you reading this blog?





Insomnia

From Wikipedia:

Insomnia
is a symptom of a sleeping disorder characterized by persistent difficulty falling asleep or staying asleep despite the opportunity. It is typically followed by functional impairment while awake. Insomniacs have been known to complain about being unable to close their eyes or "rest their mind" for more than a few minutes at a time. Both organic and non-organic insomnia constitute a sleep disorder.

Tuesday, December 23, 2008

LifeHacker Article on Saving Money

Interestingly the article is about cutting out satellite TV and replacing it with a Media Center PC and a Netflix account. TV shows can be watched on Hulu.com.

Sounds familiar.

Another source of movies is your local library, if your city isn't planning on closing it.


Monday, December 22, 2008

eBay Fun

Now that I have aspirations of creating a Mac Mini-based Media Center, I need to come up with funds for the following:

Outdoor TV Antenna

I am going to liquidate a few DVDs on eBay, you can see them here if you would like to buy them.

Of course, before they go out the door they will be put on an external hdd using Handbrake so that they can be watched again.


Mac Mini-Based Media Center

The G4 Mac Mini is connected to the bedroom TV as a Media Center experiment. I did not connect the mouse or keyboard. I already had a DVI to S-Video adaptor, purchased from the Apple Store for $9 (a returned item). Yes, the bedroom TV is an older Sharp CRT-based non-HDTV. Remember the money saving kick? These hacks are going to be cheap and dirty. I DID order a single s-video cable from Monoprice.com for the low low price of $1.55. That, plus shipping and an extra USB cable for my iPhone put me back $6.40. You can't beat Monoprice.com for cheap cables! I already had 1/8"phono to RCA for the audio.

Anyhow, we are sitting here watching some video files I had. I initially controlled the Mac Mini with my Macbook running Remote Desktop, but I'd like to work towards a stand-alone system.

One interesting option is VLC. VLC plays all types of video and audio formats, AND it will run a mini-web server that allows you to control it from any network location:

Eventually a wireless mouse and/or keyboard will probably be installed. More to come once this moves beyond "kludge" status.



Sunday, December 21, 2008

日本語でブログ出来ます。

このソフトウエアで日本語出来ます。

Now if only I could remember more written Japanese. Rusty.


Cheap Dinner Delivered

As I indicated before, I am on a money saving kick. Now, having pizza delivered doesn't sound like a frugal move, but I think I did pretty well.

Stuck at home with two of the three kids, I needed to come up with some food. Dominos was having a 6" grilled sandwich promotion, where the sandwich is free when you buy a small one-topping pizza. For $13.42 with delivery, that isn't bad. But there is more: A Google search for "Dominos Coupon" revealed several other unadvertised promotion codes, one of which was for free cinnamon sticks (Code: SWEET).

So, when the delivery driver shows up and looks at the total she says, "Oh my god, how did you get so much food for only $13?"

There was enough food for 2 hungry kids, myself, and I had 3 pieces of pizza for breakfast this morning.

Saturday, December 20, 2008

Fun with OS X Terminal

lynx -dump http://finance.yahoo.com/q?s=cat | grep Last | awk '{ print $3}'

This piece of code spits out the latest trading price for Caterpillar stock. Let's break it down:

lynx -dump http://finance.yahoo.com/q?s=cat
Pulls raw source from Yahoo! page using Lynx, a text-based browser

grep Last
Pulls line that contains the Last Trade

awk '{ print $3}'
Displays the 3rd term in the line spit out by grep.


Saving Money

I have recently decided to pare-down. One of the luxuries to be forgone is our AT&T UVerse television service. Replacing the service will be an antenna on the roof. Furthermore, the Mac Mini will be connected to the TV in order to watch the few shows that will be missed. Details of these endeavors will be forthcoming soon!

Wednesday, December 3, 2008