Export zone files from Windows 2008 R2 DNS

I had to export some zone files to move to a BIND DNS server from Windows 2008 R2. I found a couple scripts online but nothing worked. Finally I modified one of them and the resulting powershell script that worked for me is below.

$dnsserver = "[YOUR DNS SERVER NAME]"

$zones = dnscmd $dnsserver /enumzones

for ($i = 7; $i -lt ($zones.length -3); $i++) {
    $zonename = $zones[$i].substring(1)
    $zonename = $zonename.substring(0,$zonename.indexof(" "))
    $file = $zonename + ".txt"
    dnscmd $dnsserver /ZoneExport $zonename $file

Those zone files will end up in C:\Windows\System32\dns

(Original script here: http://myitpath.blogspot.com/2011/10/migrating-lot-of-zones-from-microsoft.html )

Hope this can help.

Entrepreneur survival guide for 2015

Entrepreneur survival guide for 2015

Working for yourself is exciting, but it takes the right kind of attitude and the right type of person. Life can get lonely and you go through every day knowing that when you fail or succeed, there is ultimately no one to blame but yourself. It is a difficult road to travel, but the rewards, the lessons, and the connections you can make with others like yourself can make the journey well worth it.

Over the past 6+ years I have been an entrepreneur, I’ve been building up a list of the things that help me to maintain my sanity when things get rough. I’m finally to a point where I think I have enough useful advice to share some of it with you. I hope you can find some of this post useful and I encourage you to leave some of your own advice for me in the comments. I’m always looking for ways that I might eke out just a bit more happiness from each and every day.

So without further ado, here are some things I’ve learned.

The fight is mostly mental

This is a bit of a cliché, but it turns out to be true in almost every situation I run into on a day by day basis. When you are going through a rough time with something, take a step back from it and look at it from the outside in. Take a deep breath, remove the emotions and look at the situation logically. Fretting over something, or wasting your time generating hundreds of negative what-if scenarios is not going to solve the problem or make it any easier to deal with.

The most difficult things you’re going to have to deal with are self-doubt, situational doubt, and fear. You’ll need to face these head on, and be able to look at them from an outsider’s perspective to make it through the day. You’ll need to know, to really know that even if things don’t go quite the way you want, or not the way you want at all, you will still be there the next day with a new chance to do something great.

Family and friends

Dont take your family and close friends for granted. The worst thing for your mental heath would be losing your entire support system. These people are willing to put up with your wacky hours, your mood swings, and your need to vent. Treat them with the respect they deserve.

When you’re feeling overwhelmed, talk to your close friends about your problems. Talk to the people that really care about you and will give you honest and empathetic feedback. We all need some way to let it all out. Lean on them.

Force yourself to get out and disconnect

Bad news. Your problems will still be there tomorrow. Good news! Your problems will still be there tomorrow, and you can deal with them at that point if you just can’t push yourself to work one more minute on this Friday night. Get out of the house! Get out of the office! Go spend some time with your friends and family. Go find some fellow entrepreneurs to talk business with. Anything is better than beating your head on a wall getting nowhere because you’ve burned up all your energy and you’re running on empty.

Find people you can rely on

Nothing sucks worse than being responsible for absolutely everything yourself. Find reliable people that you can rely on to help out with important work and when important deadlines are about to hit. These may be contractors, employees, or even friends. Nothing will save your butt quite like a graphic designer that is willing to whip up an ad for you in a few hours, or a coder that is willing to sacrifice most of a Friday night to make sure something is ready for release after you’ve already spent one too many days with little sleep.

Celebrate (and remember) your small victories

This is super important. You’re going to have many more small victories than super large ones. The small victories count and add up to something much bigger. Don’t take them for granted and don’t forget them. Remember them when things are tough. Remember what it took you to get here.

Don’t rely on any one thing (or person) for happiness

Remember that sometimes your just going to need people to have fun with or things to do just to get away from work for a while. Don’t put all the pressure for keeping your sanity on one person or one thing. Make sure you have a few options of people and activities to turn to for when you just need to get away from work so that you’re not stuck disappointed (and working) if plans fall through.

Don’t fight for too long physically alone

If you’re like many of us, you are probably working from home most of the time since having your own office is rapidly becoming an unneeded expense. Working physically by yourself alone for years is a recipe for emotional disaster. You’re going to start to feel isolated from people and your workspace will start to seem lifeless and lonely. Regular skype calls with employees, coworkers, and founders can help this, but eventually you’re going to need to get out and talk to people who are physically there.

Getting out to a local coffee shop can help you to feel better by simply being in a social space. You might also find others with similar interests. Even better is getting yourself a membership or an office at a shared workspace like Geekdom.  There you are sure to find other entrepreneurs and professionals who might need your advice or help, and from which you can receive the same.

Keep your chin up, and do the best you can to find peace even when things are tough. The journey and the lessons it teaches are well worth it.

Fitness progress – Spring 2015

Fitness progress – Spring 2015

Since fitness is a big part of who I am, I’ve decided to post a bit more often about what I’m up to, and try to share tips and tricks from what I have learned over the months and years of trying very hard to get in the best shape of my life.

When I make these updates I want those of you who are trying your hardest to get into shape to realize this was a very long struggle, and that I started my routines years ago when I was approaching 240 lbs. These journeys are slow, they are painful, and they will test you to your limits.

But you can get there. You can achieve your goals. You just have to believe in yourself and just keep moving. Just keep pushing. When you think you can push no further, push just a little bit more. DO NOT give in, and DO NOT give up.

Once you push into a healthy weight range, it takes some real time and effort to try to burn off the additional fat that your body will so stubbornly hold onto. Since I’m going for the lean look, I’ve been struggling to get down past 10% BF.


Like always, I struggle with body fat along my midsection, but I’ve made progress since January. Some constants as well as changes I’ve made follow:


  • I am still cut way back on sugars and carbs. I refuse to add carbohydrates beyond vegetables and some of the various low carb wraps and tortillas I have found. I just feel so much better without them. Stevia is my replacement for drink and food sweetness where I need it.
  • I still have a very high protein intake normally exceeding 125g/day
  • I still take one day a week off from my lifestyle change diet and just get whatever I want food wise. Though I don’t normally eat a lot of junk food on this day, what I do eat, usually something fun like waffles for breakfast and a burger for dinner, seems to stifle cravings for the remainder of the week. The other bonus of the one day a week off is that it makes me realize how much better I feel when I eat good the other 6 days of the week.


  • I’ve begun eating a lot more on training days, and much less on off days. This really seems to have kicked my body into confusion and I’ve noticed more fat loss around my midsection.
  • Running:  I’ve added a bit of running, usually about 30 minutes, to my routine a few days a week after weight training at the gym. A few extra calories kicked seems to be helping a bunch.
  • I’ve added some training sessions to our gym membership and the trainer is more than happy to whoop my midsection at the end of every single routine. I’ve nicknamed him Vlad the Impaler.

I still have a ways to go before I’ll be happy to call it beach ready, but I hope this and my next few progress reports can help people looking for new ways to shed a few more lbs!

As always, have a happy and healthy week, and shoot me a message if you’ve tried out some of our newest InShape trails!

InWorldz and contributions to the metaverse

InWorldz and contributions to the metaverse

Recently a video was released where a core opensim developer claimed that InWorldz has contributed nothing to the greater OpenSimulator/metaverse ecosystem. The exact statements were “Actually, InWorldz is not committing anything back.”, and “InWorldz has not given anything back.” both of which were factually incorrect. I wanted to clear up the misconceptions here because many of the code contributions and consultation time were executed by me personally.

Below is a list of contributions InWorldz has made to the wider metaverse in the past year:

  • Reported a critical OpenSim security bug and provided a patch that fixed pin protection and prevented someone from taking over all of someone else’s objects on a region by simply passing them an object or attachment to rez. This patch was applied to opensim core by Jusin CC.
  • Open sourced a big-data scale Cassandra/CQL based inventory for OpenSim https://github.com/InWorldz/opensim-cql-inventory
  • I personally tried to push a libOpenMetaverse critical security patch that was never responded to, I will try to push again to the whitecore fork so everyone’s systems are safer.
  • InWorldz Made a $500 donation to OSGrid when they needed it. No, we didn’t announce it to the world. We did something nice without expectation of recognition, but also not expecting to be attacked later on.
  • Offered to open source and contribute our C++ WHIP asset server code with a history of ZERO critical failures to date after the most recent asset failures on OSgrid. Our solution wasn’t chosen, but it was offered unequivocally.
  • Initial consulting with MOSES about their efforts to bring PhysX to opensim core and a promise to continue to help and consult where we can. We’ve already had great success with PhysX on InWorldz and want to help spread an impressive physics engine.

InWorldz doesn’t believe in demanding an HG business or other blog article every time we do something, but saying that we do nothing for the greater community over and above just advertising to bring people in, which also isn’t cheap or easy, is untrue.

We have actively worked in the background trying to help the entire metaverse in many different ways. Listening to someone who is uninformed say otherwise is disheartening and having those statements followed up by glowing reviews of competitors’ contributions suggests a personal bias that should not be stated as fact.

My history with InWorldz

My history with InWorldz

[The following was given to the organizers at the InWorldz 6th birthday celebration. I’m pasting it here for those that haven’t been able to read it]

In 2009 I lost my father at the early age of 60. I had a pretty rough job where I was going 12 hrs a day on average on business software. It was mostly web development and database work which wasn’t really my cup of tea. I was in a pretty bad state and I really was looking for a way to dig myself out of the emotional hole I was in.

I found Second Life as an outlet for my feelings. It was great to be able to express myself artistically. I found that I did a decent job at 3d modeling and that my programming experience translated to scripting.

I created a bunch of 3d stuff that I always gave away, and even owned part of a region for a time. I’ve always enjoyed sharing happiness and experiences with others where I could, and I considered renting a full region to try my hand at really reaching out to people who may have been feeling the same pain of loss and letting them know that they were not alone. The biggest problem was that I found was that it was very difficult to justify paying what amounted to a car payment for entertainment.

I did a lot of work in the IBM sandboxes which were a great place to get quiet work done. They were always kept clean and free of drama by PatriciaAnne Daviau a wonderful person who would become a great friend in my real life as well as my virtual life. Patty knew a Scotsgreymouser Janus who in turn knew Elenia Llewellyn.

Elenia Llewellyn and her business partner Legion Heinrichs were looking for a developer to work on server side code for a piece of 3d simulation software called OpenSim. It looked like a good opportunity for me to segway more into the games and visualization side of programming which I had wanted to learn more about anyways.

I agreed to work on the software and I got my own region there to build on. I ended up creating a place that really helped dispense of the emptiness that I felt. To this day “Tranquillity’s Pad” remains mostly untouched. It is my vision of an afterlife where we transcend physical boundaries and can visit far away places as part of a better, more peaceful existence.

Of course, InWorldz work wasn’t all fun and games. Just about every script I brought in crashed the simulator and I ended up having to do massive amounts of work just to try to get the engine stable for any real work. Eventually, Phlox was born out of my frustration and the frustration of our (unexpected) influx of customers. Phlox completely replaced the legacy script engine and runtime, and brought the first of many giant leaps in stability to InWorldz. I was brought on as a founder and owner of the company, and the rest is history.

I and the rest of the InWorldz staff continue working hard to provide an experience that can be as transformational to others as it was for me. InWorldz is about self discovery, and I hope it can continue to provide others with a refuge when they don’t know where to turn.

Finding the height of any point on a 2d plane perturbed by a sine wave

AKA: Making water waves

I wanted to make a special effect for some software that I’m writing. It involved simulating waves in water inside the vertex and fragment shader in an OpenGL program.

While I found a lot of posts on the subject, none of them worked from the ground up to explain what was going on with the math (mostly trig) in the calculations. Since I work a lot better when I can see examples visually, I wanted to share my thoughts while I was going about the process of understanding what I was reading in my head.

There wasn’t a whole lot as far as code because much of it is hidden behind vector operations like the dot product, but really digging down I found the methods interesting nonetheless. I hope my brain dump can make other people excited about some of the stuff behind 3d.


There are many ways to look at a sine wave. Most people know it as the uppity downity regular pattern associated with waves of all kinds. I like to look at it depicted as a continuous revolution around a circle being drawn by a marker.

Sine wave amplitude being drawn from the Y component of a rotation around a circle.

One sine wave is completed each time we go all the way around the circle. This means that as we input between 0 and 2*PI radians into the sin() function, we complete one whole wave. Once we go over 2*PI radians, the function starts over. Another way of saying this is that the domain of sine is between -1 and 1: No matter what goes in, something between those numbers comes out.

Lets say we want to create one of these waves “traveling” in some two dimensional direction given a change in time. We then want to render that traveling wave on a computer screen. We also want to be able to control the frequency of the wave. How many peaks and troughs we’ll see given a single span of 1 unit.

As shown above, we know to complete a full wave we need to input 2pi to the sin function. Therefore, we should multiply our desired frequency by 2pi.

float frequency = 2*pi * desiredFrequency;

You can think of this mutiplication as creating a situation where we pass in the same X value of 2, but more waves have been generated by that point.

Screen Shot 2015-03-06 at 6.34.41 PM

Multiplying by frequency

Since the sine wave is going in a certain direction, the last thing we need to know to draw a point on our plane is how much the position of the point is contributing to amount traveled along the wave.

We can figure this out by obtaining the dot product between the direction the sine wave is traveling, and the location of the point which is itself a vector rooted at the origin.

Screen Shot 2015-03-06 at 6.43.41 PM


Remember that the dot product tells us the cosine of the angle between point vector from the origin and the wave direction. Cosine according to SOH CAH TOA is the ratio of the adjacent side of the triangle vs the hypotenuse. This is exactly the ratio we need to determine how much of the magnitude of the point contributes itself in the direction of the wave.

Putting this together in code, we get:

float theta = dot(waveDirection, vec2(x, y));

Theta is then how much x, y point/vector has moved us along the wave.

Now, finally, we can calculate the height of the wave at the given X,Y point.

//inputs are:
//vec2 waveDirection: The direction the wave is traveling
//float freq: The number of complete waves per unit distance
//float amplitudeMul: The amplitude multiplier for this wave
//float time: input time to create wave movement
//float x: X coordinate of the point we're drawing
//float y: Y coordinate of the point we're drawing

float wave(vec2 waveDirection, float freq, float amplitudeMul, 
    float time, float x, float y) {

    float frequency = 2*pi * freq;
    float theta = dot(waveDirection, vec2(x, y));
    return amplitudeMul * sin(theta * frequency + time);

Happy waves!

The choice is yours

The choice is yours

The beginning and the problem

That’s me, the little dude on the right wearing the leg brace. My sister is sitting next to me on the left and we’re both on my father’s lap. My father was so proud of his little boy even with the minor physical glitches that he came with. My father never told me there would be things that I couldn’t do. The doctors did sometimes, but because my parents supported me, I really didn’t listen anyways. My parents told me I could be anything. My parents were right.

I was born with a pretty severe case of club foot. My left and right legs needed a lot of work when I was a child. I still have limited rotation in my ankle, and my left kneecap is malformed which creates all kinds of interesting flexibility problems.

The only way you’d know this today is by the slight limp in my every step while I run the 5k right next to you.

I never gave up and I never settled, but that doesn’t mean there weren’t rough spots along the way.

A larger version of me

A different version of me

This was me a few years ago. I had stopped caring what I looked like for a bunch of reasons, ate what I wanted, and gained a lot of weight. I was right around 230 lbs at 5’10” and not healthy at all.

I lost my father to heart disease and the problem got worse. I began experiencing heart rhythm issues that stole my ability to think about anything but what I thought was my impending death. When I finally was able to overcome my fear and the arrhythmia became less frequent, I thought again about my father. I thought about how he died so young in modern terms, at only 60 years old. I decided that I wanted to live longer than this. I’ve always felt like I have a lot to do here and that to accomplish my dreams and to pass them on, I need all the time that I can get.

Me now

A shot of me now while visiting a friend in Seattle

Long workout routines at home, eating right, and then finally joining a gym and I was able to get the weight off. I feel a whole lot better than I did, and I learned a few tricks along the way that helped to get and keep me where I am. All total so far over the past few years, I’ve lost 55 lbs. I now weigh 175 lbs and am hovering just above 10% body fat.

If you’re struggling with your weight, you are not alone. It is a tough road to travel, it is not easy to change your eating habits, it is not easy to want to work out, and the results mostly do NOT come fast. Anyone telling you they do is trying to sell you something. But if the little boy up there with the braces on his legs can do it, you can too.

Never thought I'd see myself like this

Never thought I’d see myself like this

It’s your time. Do it and mean it.

If you’ve been thinking about leading a healthier lifestyle, there is no better time to start than right now. You will feel better, you’ll have more energy, you will get sick less often, and over the long term you will have less health issues. The work you put in every day will pay off in more ways that I can even bother to try to convince you of. Based on my experience, I promise you the benefits far outweigh the sacrifice.

I want to share you with a few things I learned over these last few years. These things have helped me to keep up with my exercise routines even when I am beyond exhaustion, and have helped me to eat right even when I’d rather be grabbing a hamburger sandwiched between two donuts.

Set goals for yourself, but make them realistic

You need to know WHY you are working out in the first place. Look online for information about weight loss and set realistic monthly goals for yourself. Don’t beat yourself up if you don’t hit them, but use that as a motivation to work harder.

Make exercise a habit

Push yourself to stay on a routine for a long enough time that you feel emotionally bad when you can’t go. This takes a few months in my experience. Once you have that, the need for extra motivation isn’t as great. You will want to go and will get frustrated when you can’t. This makes it less likely you’ll skip for stupid reasons.

Distract yourself and push past into your second wind

When all your muscles are burning, and your chest is on fire, you may literally feel like you’re “going to die”. The biggest gains come when you push past that. Distract yourself. Think about something else. Be somewhere else to push past it. The worst thing you can do when your legs are burning while doing a 2 minute wall sit is think about your legs burning.

Find people that will help, not hinder your progress

If you’re going to work out with a friend or friends, do not choose people who will be prone to try and talk you out of going to the gym or exercising for various reasons on the day of. I see this all the time with groups that decide to do something like go have coffee instead of working out due to the smallest, silliest things. For example, one person is tired and convinces everyone else to quit. Avoid these people, or if you’re the kind of person that can motivate them instead, do it. Either way, if they don’t want to work out, you have to force yourself to do it without them. Don’t get sucked into the lazy trap. Find people that will challenge you and create positive group think.

Change up your workout

Your mind will bore of the same routine day in and day out, and your body will get used to it to the point where it provides no benefit. Change it up. Do different exercises. Add more weight. Run faster. Increase the incline on your treadmill. Pull up the resistance on your exercise bike. CHANGE IT UP!

If you can, go to the gym or somewhere outside of your house to exercise

I used to work out at home, and though I made huge progress on my own in the beginning, eventually I fell off. If you find yourself in this predicament, your best bet is to go to a gym. You change your surroundings, you have less opportunity to get distracted, and there is far more equipment there to use. You are also in a social environment and may meet friends to help you along your way.

If you can afford a trainer even for only 4 sessions, do it

Personal trainers can be expensive, but the best thing they provide in my opinion is customized routines. If you can afford to get a trainer for a month once a week, do it. Have the trainer build you multiple exercise routines that you can use even after the sessions have expired, and pay attention to the exercises they make you do.

Eating right

One of the things I talked to healthy people about is diets. It takes a combination of diet and exercise to achieve extreme results. I’ve chosen a modified paleo style diet, but one thing that all the modern meal plans seem to have in common is eating far less carbohydrates and refined sugars. Skip the breads, the tortillas, the pasta. I’ve personally found my mind to be much clearer and my energy levels much higher without them. Don’t be afraid of fats (especially unsaturated), there is a lot of evidence out there right now indicating they are not the evil creatures they have been made out to be. Eat a lot of protein, you’ll need it to recover.

Stop eating massive amounts of sugar. This means kicking the soda habit. Where you need something sweetened, look to natural sweeteners like stevia, or naturally occurring sugar alcohols like xylitol, and erythritol. These can even be used in almond and coconut flour to make modified baked goods!

I hope what I’ve written can help some of you who are on the fence about this stuff and help you to stick with a routine once you’ve started. I also hope that once our InShape project is up and running in the next few weeks you’ll join me there on virtual runs in the mornings. I’d love to have more friends while I’m staying fit!

Good luck. You can do it!