Shop

My New Shop
MTS Creations

Subscribe to My YouTube Channel

Friday, September 13, 2013

Angry Birds Birthday Party!

I thought I would try to document a little bit of the build for the Angry Birds build that I did for my son's birthday.



The pigs are simple milk cartons that we spray painted green (florescent because the cartons were white), then we hot glued the googly eyes on and drew nostrils with a sharpie on the lids.
Milk Cartons - free from neighbors (thanks)
Googly Eyes - $1.50 Wallyworld
Sharpie - already had
Florescent Paint - $3.76 Big Box Store



The Giant Sling Shot was a design that I came up with just from wood that I had around.  I wanted something that wouldn't bend, warp, or flex when it was pulled on.  I knew it had to be mounted so I figured I would just dig a hole and plant it.
The wood is the pre-treated 4x4 posts from the big box stores then cut into three pieces.  The main post is cut at two 45 degree angles that come to a point in the middle at the top.  Then the two Y arms are each cut straight then mitered where they meet in the middle above the point of the main post.  This is so that they will always be in contact with each other at every point of intersection.
I then used two 90 degree L brackets on the outside where all three pieces meet.  I then used another 90 degree face bracket in between the Y to support the two Y arms.  I then put two 45 degree brackets where the main post meets each of the Y arms on the outside edges.

The sling was built from two bungee cords that had to be easy enough for the kids to pull.  I didn't want to permanently attach them to the Y arms so I just notched the Y arms with a groove on each corner of the posts to provide a track for the bungee cords.  I then wrapped the bungee around itself and zip tied it as a preventative measure in case it got pulled too strongly.

The other end of the bungees are then looped through and zip tied to the 4 tarp clips which are then attached to the shop towel.

Everything came from the big box store
4x4 posts - 14.75
90 degree L plates - $4.20 x 2
Bungee cords - $3.48
Tarp clips - $4.99
Shop Towel - already had
Zip ties - already had



The boxes are just left over boxes from everything we have bought online or a new dishwasher.

Laptop startup script for a Home Hosted Domain

I run a server at my house, setup with a Dynamic IP address.  I access this server all the time and I hated when I was home that my "hosts" file was not right and I would have to update it when I was at home and then change it when I was at work.
I'm sure there is an easier way to solve this problem but I couldn't figure it out.

To solve this problem I created a windows startup script that will change out my hosts file depending on my IP address (home versus work).

<code>
@echo off
:start
IPCONFIG |FIND "IPv4" > c:\TEMPIP.txt
FOR /F "tokens=2 delims=:" %%a in (c:\TEMPIP.txt) do (
    if defined IP (
        echo IP is defined %%a
        call :process %%a
    ) else (
        echo Setting IP to %%a
        set IP=%%a
        call :process %%a
    )
)

:process
del c:\TEMPIP.txt
set IP=%~1
echo Your Internal IP Address should be %IP%
IF not x%IP:10.0.3.=%==x%IP% (
    call :home
    GOTO :EOF
) ELSE (
    call :work
    GOTO :EOF
)
pause
GOTO :EOF;

:work
IF exist "C:\Windows\System32\drivers\etc\hosts_work" (
    XCOPY /Y "C:\Windows\System32\drivers\etc\_work" "C:\Windows\System32\drivers\etc\hosts"
    echo "You are at WORK %IP%"
    move "C:\Windows\System32\drivers\etc\hosts_work" "C:\Windows\System32\drivers\etc\hosts_home"
) ELSE (
    echo "Sorry, you're still at WORK!"
)
GOTO :EOF;

:home
IF exist "C:\Windows\System32\drivers\etc\hosts_home" (
    XCOPY /Y "C:\Windows\System32\drivers\etc\_home" "C:\Windows\System32\drivers\etc\hosts"
    echo "You are at HOME %IP%"
    move "C:\Windows\System32\drivers\etc\hosts_home" "C:\Windows\System32\drivers\etc\hosts_work"
) ELSE (
    echo "WOW! Did you stay home?"
)
GOTO :EOF;

:EOF
set /p recheck=Recheck Connection (y/n)?:
if /i %recheck%==y goto start
if /i %recheck%==n goto goaway

:goaway
net stop ssh_tunnel
net start ssh_tunnel
echo "See you next time!"
pause
exit
</code>

This requires you to have two files inside of your "C:\Windows\System32\drivers\etc\" called "_home" and "_work".

_home contains something like this:
<code>
## - HOME HOSTS FILE
10.0.3.10    www.domain.com domain.com
</code>

_work would contain something like this: (note the line is commented out. Also this would be if you had some other IP address you needed it set to if your nameserver isn't working.)
<code>
## - WORK HOSTS FILE
#123.123.123.123    www.domain.com domain.com
</code>

There is a third file that I use to decide if I need to copy the file over or not and it just changes every time (hosts_work to hosts_home and vice versa)

The last thing you will notice in the script under the :goaway section is  the following lines:
<code>
:goaway
net stop ssh_tunnel
net start ssh_tunnel
</code>

This will start and stop a ssh_tunnel that I have configured to use plink to forward specific local ports to the server so that I can stream my music to my laptop.  (all of this is due to a very strict VPN that is so strict that they block almost every port.