Wednesday, December 15, 2010

Minecraft Multiplayer teleporting with a server-side script!

So I play Minecraft with a few buddies on a stock (currently updated) Minecraft server on my Windows 7 box.  One of my friends decided to build a house way out in the middle of nowhere and I couldn't figure out how to get back there.  I decided to dig around in the Minecraft server directory structure, and found the player.dat files.  I assumed they held the players' location and inventory, so I tried reverse engineering them with a hex editor to determine a player's saved location when they were logged out, but it wasn't as obvious as I'd hoped.  I decided to get a little crazy, and just copy the player.dat file over my own, and log into the game.  Low and behold, I was standing in his place with his inventory!

That got me to thinking about ways I could do this automatically as a sort of teleportation.  I ended up coming up with this script:

#!C:\Perl\bin\perl -w

use IPC::Open2;
use strict;
use warnings;

my $minecraft_server_path = 'c:\MineCraft';
my $world_name = 'blockatopia';

my $pid = open2(*OUTPUT, *INPUT, 'java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui 2>&1');

while (my $line = <OUTPUT>){
    print $line;

    if ($line =~ /(\w+) issued server command: ([\w\s]+$)/){

        my $player_name = $1;
        my $command = $2;

        if (defined $command){
            if ($command =~ /^save secret location ([0-9a-zA-Z_]+)\s*$/){
                my $save_point_name = $1;

                #Kick the player so their dat file gets updated
                send_command("kick $player_name\n");

                #give the sever time to perform the kick
                sleep 1;

                #Make sure the location directory exists
                unless ( -e "$minecraft_server_path\\$world_name\\players\\secret_locations" ) {
                    system("mkdir $minecraft_server_path\\$world_name\\players\\secret_locations");
                }

                #Make a copy of that user's .dat file and rename it to the save location listed above
                system("copy $minecraft_server_path\\$world_name\\players\\$player_name.dat $minecraft_server_path\\$world_name\\players\\secret_locations\\$save_point_name.dat");
            }

            if ($command =~ /^save location ([0-9a-zA-Z_]+)\s*$/){
                my $save_point_name = $1;

                #Kick the player so their dat file gets updated
                send_command("kick $player_name\n");

                #give the sever time to perform the kick
                sleep 1;

                #Make sure the location directory exists
                unless ( -e "$minecraft_server_path\\$world_name\\players\\location" ) {
                    system("mkdir $minecraft_server_path\\$world_name\\players\\location");
                }

                #Make a copy of that user's .dat file and rename it to the save location listed above
                system("copy $minecraft_server_path\\$world_name\\players\\$player_name.dat $minecraft_server_path\\$world_name\\players\\location\\$save_point_name.dat");
            }

            if ($command =~ /^be ([0-9a-zA-Z_]+)\s*$/){
                my $save_point_name = $1;

                #Kick the player so they'll have to load it when they log back in
                send_command("kick $player_name\n");

                #give the sever time to perform the kick
                sleep 1;

                #Overwrite the user's dat file with the player's dat file if it exists
                if ( -e "$minecraft_server_path\\$world_name\\players\\$save_point_name.dat" ) {
                    system("copy $minecraft_server_path\\$world_name\\players\\$save_point_name.dat $minecraft_server_path\\$world_name\\players\\$player_name.dat");
                }
                else {
                    send_command("tell $player_name That player does not exist.\n");
                }
            }

            if ($command =~ /^secret warp ([0-9a-zA-Z_]+)\s*$/){
                my $save_point_name = $1;

                #Kick the player so they'll have to load it when they log back in
                send_command("kick $player_name\n");

                #give the sever time to perform the kick
                sleep 1;

                #Make sure the location directory exists
                unless ( -e "$minecraft_server_path\\$world_name\\players\\secret_locations" ) {
                    system("mkdir $minecraft_server_path\\$world_name\\players\\secret_locations");
                }

                #Overwrite the user's dat file with the saved location dat file if it exists
                if ( -e "$minecraft_server_path\\$world_name\\players\\secret_locations\\$save_point_name.dat" ) {
                    system("copy $minecraft_server_path\\$world_name\\players\\secret_locations\\$save_point_name.dat $minecraft_server_path\\$world_name\\players\\$player_name.dat");
                }
                else {
                    send_command("tell $player_name That location does not exist.\n");
                }
            }
           
            if ($command =~ /^warp ([0-9a-zA-Z_]+)\s*$/){
                my $save_point_name = $1;

                #Kick the player so they'll have to load it when they log back in
                send_command("kick $player_name\n");

                #give the sever time to perform the kick
                sleep 1;

                #Make sure the location directory exists
                unless ( -e "$minecraft_server_path\\$world_name\\players\\location" ) {
                    system("mkdir $minecraft_server_path\\$world_name\\players\\location");
                }

                #Overwrite the user's dat file with the saved location dat file if it exists
                if ( -e "$minecraft_server_path\\$world_name\\players\\location\\$save_point_name.dat" ) {
                    system("copy $minecraft_server_path\\$world_name\\players\\location\\$save_point_name.dat $minecraft_server_path\\$world_name\\players\\$player_name.dat");
                }
                else {
                    send_command("tell $player_name That location does not exist.\n");
                }
            }
           
            if ($command =~ /^list locations\s*$/){
                my $save_point_name = $1;

                #give the sever time to perform the kick
                sleep 1;

                #Make sure the location directory exists
                unless ( -e "$minecraft_server_path\\$world_name\\players\\location" ) {
                    system("mkdir $minecraft_server_path\\$world_name\\players\\location");
                }
               
                my $files = `dir /B $minecraft_server_path\\$world_name\\players\\location`;
                my @files = split "\n", $files;

                foreach my $file (@files) {
                    $file =~ s/\.dat//g;

                    send_command("tell $player_name [$file]\n");
                }
            }
            if ($command =~ /^help\s*$/){
                #give the server time to finish it's help command
                sleep 1;

                #Now send our help information
                send_command("tell $player_name /save location name_of_place\n");
                send_command("tell $player_name /warp name_of_place\n");
                send_command("tell $player_name /list locations\n");
            }
        }
    }
    if ($line =~ /poop/g){
        send_command("say Not allowed to say poop!\n");
        print "[Wrapper sent]say You said poop!\n";
    }
}

sub send_command {
    my $command = shift;

    print INPUT $command;
    print "[Wrapper sent]$command";
}


This script is a wrapper around the actual minecraft executable.  It uses a module to read the output of the server (all of player's entered commands and chatting) and based on strings that it sees, sends commands back to the server along with copying and moving files around on the server side.  Once this script is running your minecraft server, you can execute the following commands in game by hitting 't' and then one of the commands below:

/save secret location name_of_warp_location
/save location name_of_warp_location
/secret warp name_of_warp_location
/warp name_of_warp_location
/be player_name
/list locations


Command Definitions are as follows:

/save secret location name_of_warp_location - saves the current location (and inventory) of the player under the name specified by "name_of_warp_location", but does not add this location to the public list.  (See the /list command below)
/save location name_of_warp_location - saves the current location (and inventory) of the player under the name specified by "name_of_warp_location", and adds it to the public locations list (See the /list command below)

/secret warp name_of_warp_location - teleports the current player to the location specified (and gives them the inventory saved at that location).  Only works with secret locations
/warp name_of_warp_location - teleports the current player to the location specified (and gives them the inventory saved at that location).  Only works with non-secret locations

/be player_name - teleports the current player to the last known location of player_name (and gives current player a copy of everything that was in player_name's inventory)

/list locations - lists all publicly saved locations on this server.  (Also lists the users currently logged on because this command piggy-backs the normal /list command)
NOTE:  All of the "save location" commands will perform a kick of the player that performs them in order to force the players location to be saved in the back-end file before it gets copied.  Don't freak out when you get kicked, just log back in and the location will be in /list locations.  Also, all of the "warp" commands will kick a player before copying their file because the login process is the only way that I know of to load a player.dat file back into a player :).

Now, the more complicated problem of making Perl run on your windows machine is a different story.  I used the Active Perl installation from the folks over at ActiveState.com in order to get it running on my machine and it was fairly straight-forward.  If not, well..there are plenty of howto's on the internet that can help you out with that ;).  Once Perl's installed, just modify these two variables to match your Minecraft server location and world name:


my $minecraft_server_path = 'c:\MineCraft';
my $world_name = 'blockatopia';


For those of you who have a nice Linux box that will run the Minecraft server worth a darn (Sadly, mine is in dire need of an upgrade) this script should work just fine for you as long as you reverse all of the \\ to //.  I didn't feel like putting the time into this to make it truly cross-platform... my bad ;).

Hope this helps you all enjoy Minecraft a little more.  It's certainly made my time more "productive"...wait...scratch that ;)

Sunday, December 12, 2010

She's five months old now...

...and boy has she changed.

I mentioned in my last post (yeah, two months ago) that I was hoping that the next post would be about Fiona laughing and playing more.  I'm proud to say that she absolutely is a happier baby these days. She can sit up on her own (after we put her there ;) ) but will eventually fall down.  Her legs are strong, (they have been for awhile) and she can hold up her own weight for a very long time as long as we're keeping her steady.  We're both wondering if she'll walk before she crawls.

She despises tummy time, but we've found that we can trick her into laying mostly on her belly with her new Tigger stuffed animal.  Nap times are much easier to get her into now, and we've become quite adept at telling when she needs one.  She's also an excellent sleeper at night.  Her bedtime is around 9:00 PM depending on our schedule and when she ate last.  Until two nights ago we were still tightly swaddling her in her crib.  We made the decision to stop based on her increasing ability to get her arms free.  It's been mostly un-eventful, except that she did wake up once each night a bit fussy.  We waited it out, and each time it only took about 60 seconds for her to fall back into a deep sleep.

Kim has officially stopped breast feeding which means Fiona managed to get almost 5 full months of breast milk.  It really broke her heart, and made her doubt herself as a mother (which was a silly thing to think in my opinion because it wasn't like she quit on purpose.  Her milk simply dried up. ;) ) but now Kim's able to sleep through the night instead of waking up to pump and we have much more freedom when we're out and about.  She's also enjoying her coffee and alcohol again..in moderation of course :). 

We recently got to experience our baby's first cold.  It wasn't severe, but it was definitely different to see how Fiona reacted to being under the weather.  Surprisingly, she wasn't fussy.  In fact, she honestly seemed to feel too bad to bother with being fussy.  Her facial expressions were blank a lot, and she just wanted to sleep.  Her poor stuffy nose was really difficult to work with.  It will be so much easier when we can just tell her to blow her nose when she's older.  We took the suggested precautionary steps that our pediatrician recommended for congestion which included buying a humidifier and keeping it in her room.  She may not have needed it, but I know from personal experience how dry air can turn a simple cold into bronchitus.  Thankfully, the little girl bounced back rather well, even with our holiday traveling and she seems to be much better now.

So those were the facts.  Here are the feelings.  Kim and I are both mentally exhausted.  We've not been comfortable allowing anyone else to babysit for us since Fiona has been born, and I think we're finally feeling the fatigue from not having any "us" time.  With my full time job, and Kim staying at home with her all day, we both feel like we work 100% of the time.  Weekends certainly don't mean what they used to, but with the two of us to split the load of caring for our daughter, the weekends ARE easier going than a normal work day. 

On an introspective note, I never really appreciated the extra load it puts on a person to be responsible for another human being.  Especially with one who's a bit higher maintenance than most.

The holidays certainly aren't helping our stress levels.  We're trying very hard to be aggressive about paying off debt so that we can move out of this house and into a new one that better suits our needs and wants.  Currently we're crammed into this one, and I think the tight spaces are getting to both of us.  Unfortunately, being aggressive about debt doesn't agree with holiday shopping, and we seem to have many more nieces, nephews, and cousins this Christmas to shop for.  It's got the two of us with pretty short fuses ;).  Thankfully we've been pretty good about talking our feelings out before either of us explodes.

We're trying to stay focused on the important things through all of this.  We want Fiona to participate in Christmas, even though we don't necessarily buy in on the same reasons that everyone else does so we have a Christmas tree up this year.  We also try to take her out to see family a lot, and we've started watching our language a lot more as I'm told she's a sponge at this stage ;).  We do our best to split up her day by playing with her directly, letting her play by herself, talking to her a lot, trying to make her laugh, and cuddling up close to her (which is what her and her mom are doing now ;) ) so that she experiences a wide variety of behaviors.  We don't want her to be co-dependent, nor do we want her to be a hermit, so we try very hard to balance her life out as much as we can and when we see a habit start to form that we feel is unhealthy (such as only wanting to nap in Mommy's lap ;) ), we do our best to nip it in the bud.  So far we're very happy and proud of her habits (especially her sleep habits ;) ).  I feel that Kim and I are a perfect match when it comes to how we want our children raised, and I'm very thankful that she and I are together to raise Fiona and our future children.

I won't make any empty promises that I'll post more frequently, because quite frankly it took some good timing to be able to write up this post.  Raising babies is time consuming and ever-interrupting.  Perhaps when she's old enough to entertain herself more I'll have more time to do frivolous things, but I'm not there yet so I don't know ;).

Thanks for reading...tune in next time :)

Wednesday, October 27, 2010

Web page slideshow

So I was tasked with making a web page slideshow for some community televisions at work, but after some research, all I was able to find were image slideshows.  Here's a simple page I threw together that uses a json configuration file to display multiple web pages for a defined period of time, and then slide to the next one.  Below is the html and javascript.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Slideshow</title>

<style>
body {
    overflow: hidden;
    cursor: none;
}

#page2 {
    display: none;
}
</style>

<script src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
    var slideshow;

    var iteration = 0;
    var timer;
    var slideshow_count = 0;
    var op;
    var fade_timer;
    var current_page = 1;

    //Initialize the slideshow settings from the json config file
    $(document).ready(function() {
        //This primes the loop and gets everything going

        //We're using the ajax method instead of getJSON because caching is automatically
        //turned off with the .ajax call.  Also, when specifying the dataType jsonp,
        //the returned json data is automatically placed into a script tag and executed
        //with the callback function.  Our data source here has a static callback called
        //slideshow_settings, so we don't have to pass anything extra in.
        $.ajax({
            url: "slideshow_settings.json",
            dataType: "jsonp"
        });
    });

    function get_next_iteration () {
        if (iteration + 1 >= slideshow_count) {
            return 0;
        }
        else {
            return iteration + 1;
        }
    }
   
    function other_page () {
        if (current_page == 1) {
            return 2;
        }
        else {
            return 1;
        }
    }

    function slideshow_settings (settings) {
        iteration = -1;

        slideshow = settings;
        slideshow_count = settings.dashboards.length;

        do_next();
    }

    function switch_pages () {
        $('#page' + current_page).fadeOut(1000, function() {
            $(this).css('display', 'none')
            $('#page' + other_page()).fadeOut(0, function() {
                $(this).fadeIn(1000, function() {
                    current_page = other_page();
                    $('#page' + other_page()).attr('src', slideshow.dashboards[get_next_iteration()].url);
                    timer = setTimeout(do_next, (slideshow.dashboards[iteration].duration * 1000));
                });
            });
        });
    }

    function do_next () {
        //Clean up after ourselves to prevent memory leaks
        clearTimeout(timer);

        //Loop has started anew.  Check our config file again.
        if (iteration+1 >= slideshow_count ) {
            $.ajax({
                url: "slideshow_settings.json",
                dataType: "jsonp"
            });
        }
        //Do the work
        else {
            iteration++;
            switch_pages();
        }
    }   
</script>
</head>

<body style="margin: 0px; scroll: off; background: black;">

<iframe id="page1" style="width: 1920px; height: 1080px; border: 0px;"></iframe>
<iframe id="page2" style="width: 1920px; height: 1080px; border: 0px;"></iframe>

</body>
</html>

Friday, October 8, 2010

Busy busy Daddy

I suppose this is the way all new parents feel.  The combination of contract work plus staying busy at the full time job keep me a very busy person.

Fiona is growing like a weed.  I noticed while Kim was holding her a few weeks ago that her legs were hanging down further than before.  It's weird how she can change so much when I see her every day.  Also, I'm not sure when it happened, but within the last month she has started sleeping through the night completely.  I feel fairly confident that it has to do with Kim's feeding schedule which was suggested by a book she read called Baby Wise.

The basic concept (that I've been able to glean from her discussions about it) is that the baby needs to get X number of ounces of milk a day.  As long as she's getting those ounces, you can slowly start giving her more during the day on a set schedule (meaning we have to wake her up if she's asleep) and at night, we don't bother waking her.  The result is that she eventually started sleeping longer at night.  I know for a couple of weeks that she was only getting up once at night and we were ecstatic about that.  Then, within the past two weeks (I think) we've had to wake her up at 7:30 to feed her.  After the horror stories I've heard about babies not sleeping through the night for the whole first year, I feel like we're very fortunate in the sleep department.

On the other hand, Fiona is still having some colicky symptoms during the day.  I think some folks think we're exaggerating about her fits of pain, but they're hard to ignore.  It got so bad that we took her to the doctor again a few days ago.  When we described the symptoms (Fiona's screams were blood curdling, she constantly clenched and unclenched her hands leaving scratch marks on herself and our arms and hands.  Her whole body was tensed and she thrashed around a lot.) the doc gave us a prescription for a medicine to help relax a spasmodic stomach and a new reflux medicine.  We've only had an opportunity to use the new anti-spasmodic drops a couple of times, but she seems to calm down immediately when we do.  I'm not sold on the idea, but anything that will relieve her pain is worth it.

She got to meet her grandmother and great grandmother on Kim's side a couple of weekends ago.  I'd met Kim's mother before, but had only heard about her grandmother and wasn't quite sure how the visit would turn out.  As it ends up, her grandmother is a riot and I ended up having a pretty good weekend.  I believe Kim's tension was higher than normal due to it being her family.  I get the same way with my family if I'm expecting a certain reaction and don't actually get it ;).

I should mention now that Fiona is smiling much more.  She doesn't even have to be on her changing table!  She's always in a good mood in the morning, and she gives mommy and daddy tons of big smiles.  I have to say, nothing makes my day more than to see her smile at me.  I can be in the worst of crap moods and instantly I'm better.  I long for the days of her laughing, talking, and running to see me when I come home from work.  I'm a sap like that.

And now....Pictures!!!

Super Fiona!

Package for you Daddy!

Mommy, that medicine is yucky.

Wearing down your defenses in 3...2...1...

It doesn't get cuter than this.


Going to try and update Facebook with all of the pictures I have of her, and upload any videos to Youtube.  Hopefully the next post will be about her laughing, or playing.  So far she doesn't do any of that...but any day now.

Wednesday, September 1, 2010

It's been a rough week so far, and only three days in...

Last week, Kim got in touch with Fiona's pediatrician to discuss her colic and options for making her more comfortable.  After an extensive round of questions about Fiona's behavior when she goes into her crying fits, the doctor recommended something called probiotic drops.  Apparently these are meant to help provide essential bacteria to a baby's digestive track to help with the digestion process and ease her symptoms.

It took us all afternoon to find someone who carried them, and when we finally did it was too late in the evening to go get them.  We seriously called/visited 10 different pharmacies.  About half of them normally had it, but claimed it was sold out.  Turns out this stuff is like $40 a bottle, and it's a tiny bottle.  Multiply a thimble times two and you'll get a good idea.  We were convinced it was some magical elixir for that price.

At any rate, by Friday night, we were able to give her some, and she slept nearly 6 hours then, and 7 hours Saturday night, and was remarkably much happier than normal.  Sadly, the peace was short-lived.  Though she definitely still tends to sleep well the first part of the night (averaging 4-5 hours, then 2-3 each time we put her back down), she still goes into screaming fits of pain most of the time when she's passing gas.  We're not talking about just a fussy baby...I mean I'm afraid that someone will walk up to our door and think we're beating her. 

According to the doctor, we've done everything we can do.  It's definitely the colic at this point, and it will simply have to run it's course.  We even discussed with her the home remedies that we've read about and heard from friends, and have been told adamantly to stay away from giving our baby Coca-Cola as a solution.  Apparently the caffeine can exacerbate the colic, and Coke is harsh on their digestive track anyways.

So here we are, halfway through the week, both of us doing our best to keep our patience.  Tonight, however, patience isn't my problem.  I'm at that point where you start to wonder if you're doing something wrong.  We see very few smiles from our baby, and if she's not sleeping, she's crying, save for the 5% of the time when she's just looking around the room.  I've actually had to calm her in her bed three times since starting this post.

I think the most frustrating part of this is that when I look at our little girl, I have a hard time picturing her ever giggling or laughing.  I know she will one day, but only because of what others have told me.  There is one small nugget of hope, and that's when we set her on her changing table.  I don't know what it is, but sometimes, even when she's fussy, we can put her there, and all is right with her.  She'll just lie there and stare at us occasionally making funny noises.  It doesn't last terribly long, but it is a light at the end of the tunnel.

For now, I just need to try and find spare moments like these, put my head down, and get this extra contract work finished.  Paying off debt, and preparing our family for a new home are high on the priority list.

Sorry if this post is a bit negative...gotta take the cons with the pros.

Wave

Tuesday, August 24, 2010

Not much new.

So there isn't much "new" to write about in the realm of fatherhood.  Fiona hasn't changed too much, and is still very much a sleep/poop/crying machine.

I can take a minute (since she's sleeping ;) ) to write about the "old" a bit.  It's been about 8 months since Kim layed the news on me that we were going to be parents.  As is normal with most folks, I ended up holding onto the kitchen table for a few minutes trying to catch my breath.  I was also nursing a slight hangover from the Thanksgiving party the night before.

It's amazing to me how much a life can change in a single day like that.  The night before I was living in a world of randomness.  I didn't know what I was going to be doing from one night to the next, and I didn't have any type of long term plan in regards to starting a family.  Spontaneous fun is great and all, but it tended to leave one a bit empty late at night.  Now here I am, nearly a year later, and I'm doing contract work with plans of paying off debt and moving into a more family friendly house.

I'm sure lots of folks would argue about our methods, and I'd be surprised to find out no one criticized us behind our backs.  We weren't married.  Hell, we were actually far from it.  Still, our feelings for each other have always been there, and we've always been close.  My real feelings came to me that day on Friday, November 14th, of 2009 when Kim told me that she was pregnant.  Though it took me a good full hour to grasp what she was telling me, neither of us hesitated.  My mind was reeling with thoughts of spreading the word and moving onward with our lives together.

I think both of us got a real kick out of telling our families, and everyone of them were overjoyed and extremely supportive.  I find myself anxious for holidays this year...unlike previous ones.  It seems children really do bring families closer together.  

Like I said, it's just crazy how much your life can change in a single moment. 

Ah well, I hear the little one stirring around.  Time for her late night feeding, and then sleep for her and her mommy and daddy. 

Wednesday, August 18, 2010

Motorola Droid USB Tethering

I found out today (the hard way) that the new tether option included with the Android 2.2 update doesn't actually do anything. Maybe there's a fee I can pay Verizon to make it so, but that's not happening.

In my research to find out how to make the tethering feature work, I discovered a method of tethering I'd not heard of before (and apparently it's been around awhile.)

You don't have you root your phone AND it's completely free. Win win right? It just takes a little bit of configuration on your computer. For this post I'm going to focus on OSX because that's what I use, and there seem to be a plethora of others out there explaining how this works in Windows.

I used this guy's blog as a basis for what I did, and I changed very little: http://jimcortez.com/blog/?p=37

His first step is to install openvpn on your Mac. I already had Viscosity installed on mine and I wanted to try and use it instead of installing a separate openvpn client and using the custom script provided. This method instead allows you to use the Viscosity icon on your menu bar to initiate your tether. It's cleaner in my opinion and allows me to use one central location to initialize the tether and then my work vpn.

For this method you need only follow a fraction of the steps provided from the blog above.

1. First, install Viscosity. You can find it here.
2. Install Azilink to your phone. Instead of going through the trouble of installing the SDK, I find it's easier to just install it directly on your phone from a web browser.

On your phone do the following:
  • Menu->Settings->Applications->Check the "Unknown Sources" box.
  • Install "Astro File Manager" from the Marketplace
  • Open Astro->Menu->More->Preferences->Check the "Enable Browser Download" box.
  • (Remember to uncheck that same box when you've finished downloading things from the web...that feature can break your ability to view attachments in Gmail)
  • Download Azilink here.
  • Open Astro and browse to your download directory. Clicking on the file should give you the option to install it (if you've followed the previous directions properly.)
3. Now run Azilink and check the "Service Started" box to make sure it's enabled.
4. Enable USB Debugging: Settings->Applications->Development->USB debugging
5. Create a file with these contents:

#viscosity startonopen false
#viscosity dhcp true
#viscosity dnssupport true
#viscosity name azilink
remote 127.0.0.1 41927
ping 10
dev tun
proto tcp-client
route 0.0.0.0 128.0.0.0
route 128.0.0.0 128.0.0.0
socket-flags TCP_NODELAY
dhcp-option DNS 192.168.56.1
script-security 2
ifconfig 192.168.56.2 192.168.56.1

5. Make sure Viscosity is running and click on the menu icon for it and go to Preferences.
6. Click on the plus (+) icon and then Import the file you just created.
7. Now click on the azilink entry that you just created and then Edit
8. Under "Certificates" choose "Static Key" (You get a weird error about a missing certificate if you don't do this.)

Now connect tether your phone to your laptop, and click on the Viscosity icon and then "Connect azilink."

If everything went according to plan, you should be surfing the inter-tubes now :)

2:00 AM

So here I sit, thinking I've finally gotten her settled down. I suppose it wouldn't be fair if I didn't share the bad along with the good. Normally my temper is pretty stable, but I gotta say, she's sure testing my patience tonight.

Scratch that...she's decided she's not going to sleep so the remainder of this post will be typed one handed...typos be damned.

I honestly can't say why she's so inconsolable tonight. It could be the colic, but how am I supposed to discern that from just normal fussy baby tendencies? It's obvious the way she's squirming and occasionally screaming out that her tummy hurts her, but we've been giving her gas medicine for weeks and reflux medicine for days. I've not noticed any kind of change for the better.

...and now she has the hiccups and is even more upset.

I have noticed a correlation between her screams and her passing gas, but if that's the problem, what good are the gas drops we've been giving her?

Well, I tire of typing with one hand...today is starting out too be a long day. I've tried to put her down 3 times during this post which I started at 2:00 AM...it's 3 now....let's see if the fourth time's a charm.

Waverly

Tuesday, August 17, 2010

Android 2.2 for the Motorola Droid

Did I forget to mention I planned on talking tech in this blog? It's true. This is proof. Luckily for you I'll be tagging each of these blogs appropriately. The tag 'daddyhood' will refer to just that, while 'techtronics' will be anything tech related I care to share. I'm sure I'll add more tags later on for fun.

Onward to the topic of discussion!

I manually installed the official Android 2.2 update on my Motorola Droid today because I couldn't bear to wait for them to push it out to me automatically. I used this site:

http://www.droid-life.com/2010/08/03/manual-android-2-2-update-for-motorola-droid/

I've only been using the new version for about 6 hours now, and I have to say, I'm impressed. I've been feeling a bit tired of my Droid as of late, and have seriously contemplated upgrading to the X or the Droid 2. (Of course, I was delayed in action by yet another set of rumors that the iPhone is coming to Verizon in January...who knows if it'll actually happen.) ANYWAYS, this upgrade makes my phone feel brand new again. Here are some of the reasons why:

1) My phone is WAY more responsive. No laggy screen scrolls, and much less hesitation when I open an application. The phone feels twice as fast.

2) The Gmail app has forward and back buttons for scrolling through emails now! I know..this should have been added in version 1.0, but somehow it was missed. Anyone who uses Gmail on their Droid has to have shared my pain in this. Also, there's a button on the inbox screen that allows you to switch to a different email account if you have more than one configured. As far as I'm concerned, the Gmail app is now complete.

3) The update installed a new and up to date version of the official Facebook application. This version provides an icon to access your inbox on Facebook, as well as forward and backward arrows to cycle through messages and pictures. Why the inbox was left out previously, I still don't know.

4) The camera has been noticeably enhanced from 10 fps to 20 fps in the viewfinder window. What this means is that the camera "feels" less sluggish. I haven't taken many pics with it yet, so more on that later.

5) Manually typing in "smileys" in any sort of text is less of a pain now! I know..small gripe, but for some reason someone decided that all colons (:) were meant to rest right up against the letter previous to them. This was an auto-correct feature that I never quite figured out how to disable on my phone (I actually didn't try *that* hard, but still). This behavior is gone now it seems.

6) Tethering! I have the option..haven't tried to use it, but hey, I have the option!

7) Weird sound problems fixed. I think this was a specific problem with my phone, but my phone started to develop really strange audio problems. Music stored on my device (including ringtones and sound effects) started sounding very distorted at times, and almost seemed like things were moving in slow motion. (Now that I think of it...a reboot could have fixed the problem...)


Those are the pros I've found so far that directly affect me. Here are some of the cons:

1) My Microsoft VPN still doesn't work reliably. We use 128 bit encryption at work, and have discovered that for some reason, the higher the encryption, the less likely the vpn is to work. Even at lower encryption levels the vpn is intermittent. So I say boo to this. One more reason to root the phone and install openvpn...

2) Flash is s-l-o-w. I installed the flash app, and attempted to watch a clip on abc.com. It wasn't very watchable. Not a big deal...I don't *need* flash, but still.

3) Home screen still doesn't auto-rotate when the phone is flipped sideways. I realize I can slide the keyboard out and get that behavior, but that's not what I want. I mainly use the on-screen keyboard when I'm using the phone. I'd like to be able to turn the phone sideways and just use the touch screen to interact with the home screen. The "auto-rotate" flag isn't doing it's job properly in my opinion.

4) No hotspot. :( I know this was announced, but I'm still sad to see it's not present on my Droid. I may root my phone yet.

That's all I have so far. I may find other goodies soon, but my first impression is that it's a great move in the right direction for the Android operating system on these phones.

Waverly

Monday, August 9, 2010

1 month of being a dad - thoughts

So I decided to start a daddy blog at Fiona's 1 month birthday. That was last Sunday. Obviously, being a daddy is more time consuming than I realized, as this is the first chance I've had to actually post!

First impressions are that I didn't quite take into account just how little babies sleep (or should I say how many times they wake up during the night) the first few months. Somehow I had it figured out that babies were only rough the first month or so...upon further research I realize that she potentially won't sleep through the night for the whole first year! It's been very difficult for Kim and I to adjust, but so far I think we're doing well. The most frustrating part of her fussy nights is MY frustration. I thought by the age of 31 I'd have learned to control my anger pretty well, but there's nothing like a baby screaming at the top of her lungs directly in your ear knowing full well you've done everything you can for her.

Still, it's gotten much easier, and I've always managed to quell my desire to yell at her, though the stern daddy voice has definitely emerged once or twice :).

Kim and I are adjusting well and have even developed some patterns and a general schedule. I think they could still use some work, but I'm very pleased with how well we both seem to be at communicating with each other. Don't get me wrong, we both lose our cool from time to time, but the turn around apology times are always quick.

Originally this post was going to be about reflection of the past year, but I think I'll hold off on that for the time being. I rarely get time for posting, and that type of post is much more involved. (I attempted to start that one twice, and after it sat on the page for 4 days I gave up...hard to get my mind into it when I'm constantly side-tracked ;) )

So there, first post complete. I hope to be adding funny stories and introspective views on fatherhood as Fiona grows up, as well as what it'll be like when we have our next baby ;).