Michael Rice dot Org

February 7, 2010

Soda Pop Addiction

Filed under: General, life — Michael Rice @ 12:21 pm

For years I have not had any kind of soda pop. At some point in my life I started noticing I would get a bad stomach ache after drinking a soda. I never really thought much about it… I just quit drinking them. Well a couple of years ago I started getting sick a lot. I went to my regular doctor and nothing was obviously wrong with me. I started thinking about the feelings I got when I felt sick.. it reminded me of when I would eat peanuts which I am very allergic to, it also reminded me of how I felt when drinking a couple of sodas. This made me think.. So I went and got tested for allergies again. I had not been tested since I was about 12. This time I asked that they only test me for food allergies. As it turned out I am allergic to soy, and corn too. Aha! No wonder when I would drink a soda I felt so sick. All the sodas seem to be sweetened with that nasty high fructose corn syrup crap.. Well bummer for me right.. no one makes soda with sugar these days right.. WRONG!! I don’t know if this is a good or bad thing because now I am re-addicted to soda again. I started looking around and found that Mexican Coke was still made with sugar, then I found out that the Dublin Dr Pepper plant still made Dr Pepper the original way using Imperial Sugar, next I start looking hard for all kinds of sodas that are made with sugar and to my pleasant surprise there are TONS out there. We now keep Mexican coke, Pepsi throwback, Dublin Dr Pepper, and many many others at our house. They all come in glass bottles too just like they should (except the Pepsi.. wth Pepsi..). I have found TONS of delicious Root Beers made just like it used to be made “back in the day”. I find most of these sodas at Central Market, and Whole Foods. The Mexican Coke and the Pepsi ate the cheapest at Costco from what I have found. I also found this AWESOME stuff called Bubble Up that is a lemon lime soda, it is made with real sugar and with Lemon and Lime oil extracts.. It is SO much better than Sprite or 7up could ever dream of being..

  • Share/Bookmark

January 6, 2010

I already know that..

Filed under: life — Michael Rice @ 7:12 pm

I [already] know [that] is the default response from my daughter. Doesn’t matter what you are telling her. You could be telling her she needs to clean her room, or maybe that you were just thinking to your self how you were fixing to go outside. “I know!” is what she says. Tonight she noticed that she says that a lot. Her mom was telling her “Well I was fixing to go outside so I’ll let the dog in” and she replied “I know… well wait, I didn’t know that.. I guess I say that a lot when I don’t know huh?” It was pretty funny cute

  • Share/Bookmark

December 30, 2009

5 years and I still dont have anything interesting to say…

Filed under: General — Michael Rice @ 7:56 pm

Wow so its been a little over 5 years since my first post. What a ride its been! I wonder what the next 5 will bring? With any luck the winning numbers to the lottery so I wont have to work any more :)

Please be safe while celebrating this holiday season and dont drink and drive

  • Share/Bookmark

December 23, 2009

daemontools + mono + dream

Filed under: Linux, unix — Michael Rice @ 4:54 pm

daemontools is a wonderful alternative to using inittab or rc.d startup scripts on your favorite Linux and BSD boxes. I really like using it, but Im not here to sell you on it, simply to tell you how you can use it to keep your dream server going. I am going to use the 8-ball example from the mindtouch site for this example. First I like to go to the directory where I keep my dream app.

cd ~/8-ball/bin

This is the directory where my mindtouch.host.exe file is located. Next using my favorite $EDITOR I will

$EDITOR run

In this file I will add the following:

#!/bin/bash
cd /home/errr/8-ball/bin &&
exec envuidgid www-data /usr/bin/mono mindtouch.host.exe script 8ball.startup.xml \
public-uri http://slice.michaelrice.org:8081/ \
server-name http://slice.michaelrice.org \
ip slice.michaelrice.org:8081

Next save the file & set the script to be executable

chmod +x run

Now I will explain a couple of things here. First off the envuidgid is a command from daemontools so you may need to provide the full path to your file location of this if it is not in your $PATH. Second off is the IP flag. If you use an IP here from my testing then the host will only work when you type that IP. See more about that here: http://forums.developer.mindtouch.com/showthread.php?p=36055
Now you need to be root (or you can use sudo) for this next part. Head to your service directory. If you installed daemontools from source that is typically /service but if you are like me and use Debian/GNU Linux and used apt-get to install it then it will be located in /etc/service Simply change to the directory and symlink:

errr-slice.michaelrice.org | /home/errr | 16:38 |
» sudo -s
[sudo] password for errr:
root-slice.michaelrice.org | /home/errr | 16:38 |
» cd /etc/service
root-slice.michaelrice.org | /etc/service | 16:39 |
» ln -s /home/errr/8-ball/bin 8ball

From here its like any other new service we have ever added. svscan will automatically start the new service within 5 seconds. You can verify that its working with ps, svstat or by just hitting the URL directly. In my case you can see my example here

  • Share/Bookmark

December 15, 2009

Slice Host

Filed under: Linux — Michael Rice @ 8:56 pm

So I got me a VPS the other day. I really missed having a Linux box at my disposal to test cool stuff with, or do what ever other really geeky things it is I do with Linux boxes. One of my buddies who happens to work at Rackspace just couldn’t say enough positive stuff about Slice Host and neither can I. As you may or may not know Slice Host is a Rackspace company (which means awesome everything!! support, stability, network speed…).This is a kick ass deal!! I currently have 2 256 slices. On one of them I am running tinydns for hosting my DNS (even though slice host will do that for me for free… what fun is that?),exim4 to host email for a few users (even though you get this super cheap offer from slice host to have rackspace host your email for you.. again what fun is that?), lighttpd to host some php sites (I am using SQLite for all my databases), and nagios to monitor some sites I like to keep an eye on. I also have that same machine setup for hosting Mono apps. One of which is Dream, a wonderful frame work I am very interested in right now. All this and I still have like 80M of free memory. Im not even sure what I am going to do with my new slice but Im sure it wont take me long to find some new cool thing I need to test out.

  • Share/Bookmark

Things I find Annoying…

Filed under: General — Michael Rice @ 3:01 pm

I freakin hate when there is an ad for something and they show a price and in tiny microscopic print they put “after pain in the ass to get split between 4 companies mail in get screwed on rebate” Why dont these companies stop doing this and they be the ones to deal with the mail in crap. I want my discount now, and I dont want some technicality like me forgetting the correct department to ship it too to end up costing me my nice discount that made me buy the item in the first place…

Next why are all these computer makers still pumping out PCs and shipping them with a 32b os? Then to top it off when you call them to get a copy of the 64b so all the memory your computer came with will be used some of them are telling you to bad. Seriously.. why would you sell me a laptop with 4G of ram then put an OS on there that will only report 3.25 of it as usable. Thanks. Should I just throw the other 768 in the trash? Why not just put a 64b system on there to begin with and make everyone happy.

  • Share/Bookmark

December 11, 2009

Save a life

Filed under: General — Michael Rice @ 4:57 pm

So I got this thing in the mail the other day from this cancer research center. It had a nickel in it. On the front it said “Find out how this nickel can save the life of a child”. Im thinking to my self… If this nickel really can save the life of a child why did you just send it to me? I don’t need it… So I put it back in the mail “Return to sender. Please use said nickel to save a childs life”

  • Share/Bookmark

November 20, 2009

Redirect MySQL Traffic on FreeBSD with PF and SSH

Filed under: freebsd, mysql — Michael Rice @ 11:00 pm

So this week at work we were going to be taking a machine and splitting some server services off and onto smaller easier to manage virtual machines. One of the services this server was goign to stop serving is MySQL. As you may or may not know MySQL runs (by default) on a non-privileged port (3306). This is important to know later. This server was pretty old. Its was running FreeBSD 6.0 This server has been on the same IP running the same services for more years than anyone in IT can remember. This means there are going to be TONS of scripts all over the network that over the years have been long forgotten about, so when we move MySQL off and onto the new stand alone system we are going to have to go all over trying to find broken scripts and point them to the new DB server… Or are we?

I was thinking I should solve this problem before it fills our ticket queue :)
I decided to use PF since this system already had it. This server only had 1 NIC and we have more we could add but we cant have down time so I needed to figure out a way to do it with only 1 NIC. The solution I came up with was pretty simple and used only things that are available on a default install of FreeBSD
First I used ssh to do a simple port forward so that connections on the old servers localhost port 4040 would forward over an ssh tunnel to the new servers port 3306

ssh -L 4040:localhost:3306 dbproxy@newserver

Next I added a rule to my pf.conf

rdr pass log on $int_if proto { tcp, udp } from any to any port 3306 -> 127.0.0.1 port 4040

This rule redirects traffic headed to port 3306 on the old server (any interface l0 or em0) to port 4040 on the loop back interface, where we did our non privileged port forward with ssh.

Then a simple reload of my pf.conf and now Im all setup and dont have to worry about those scripts around the network, and the fact we log this rule we can now make a simple parser for our pflog to find out which hosts are using it and then go find the scripts and fix them with out having to have a ticket to do it first.

I would also like to mention that MySQL offers a solution to do this as well called the MySQL-proxy. We could not install that on this machine though.

You can see the thread on the FreeBSD forums where I originally posted the problem, and solution: http://forums.freebsd.org/showthread.php?t=8447

  • Share/Bookmark

April 11, 2009

Have you tried rebooting your computer?

Filed under: General, life — Michael Rice @ 10:08 am

I have recently gotten into this awesome show called The IT Crowd. Its really funny. I thought I would share with you a really funny clip from season 1.

  • Share/Bookmark

March 31, 2009

South Park does it again

Filed under: General, life — Michael Rice @ 8:10 am

Well the guys at South Park did it again. Here is a classic clip from a recent episode of South Park

  • Share/Bookmark
Next Page »