Sunday, May 9, 2010

Setting up a torrent

Here's a quick, no frills, text-only tutorial on setting up your own torrent (and personal tracker), for family photos, family movies, etc (using uTorrent)...

  1. Get your external IP address (or dyndns address)
  2. Get your uTorrent listening port (by Options > Speed Guide)
  3. Forward that port on router (sorry non-tech savvy peepz)
  4. Enable Tracker (Options > Preferences > Advanced > bt.enable.tracker = true)
  5. Create Torrent!
    1. File > Create New Torrent...
    2. Select files you want to server
    3. Trackers = http://yourExternalIP:yourForwardedPort/announce
    4. Check Start Seedings and Private Torrent
    5. Click Create and Save As... to make torrent file (then wait)
    6. If you see the torrent in your list, a green arrow, and everything is seeding, you are doing swell! If not, check your port and check it with the built-in Speed test in Options > Speed Guide
  6. Give that torrent to all your friends and ensure tracker is always up (because of private torrent option).

Good luck all, and to all a good night!

- E.T.

Tuesday, April 6, 2010

What do you do?

Dear Blog,

What do you do!? What do you do when you have a friend that has only 6 weeks to live?

Granted, this friend and I haven't been in contact for years now... but it's his last days, and I have a way to contact him. Aww man, I just don't know!?

I really don't think about this often. I don't know how I would react to death? Personally, I want to feel like at any moment, I'd be ready... but I don't think I would be. There may be things I still need to experience. I tell you my priorities would be so much different if I knew I only had 6 or less weeks to live.

My friend has really touched my life, and molded me from someone who would have been completely dull to someone with a little personality. We have had adventures and I don't think I could forget them.

But what about now? What do I do? We can't relive those adventures, because I'm not that crazy (or young) anymore.

Hmm... oh well, the truth is, I got nothing. I will just try to be there, and maybe he'll know what I could do for him.

- ET

Monday, April 5, 2010

April Showers Bring May Flowers

Dear Blog,

I was thinking about how I was going to start this entry off. I got a few things on my mind in the middle of a Sunday night. Don't know where to start, but I try...

Saturday was such a weird day. It starts off with Colleen hitting my car as she backed out the driveway. It dented my hood a little, but really nothing noticeable compared to all the other things wrong with my car. Then we car pooled with Rebecca to see Wicked. But as we got on the interstate on Power, we tried to merge in with traffic. Rebecca and an eighteen wheeler were side-by-side by the end of the merge. What were our choices? Brake was the first thing! But there was too much momentum to stop on the dime.... so hit the eighteen wheeler or hit the side rail? We hit the side rail, sort of bounced off, and the eighteen wheeler clipped the rear view mirror. Strange thing was that we were still driving right behind the eighteen wheeler going like 60 like nothing happened. Haha. Needless to say I was a bit scared during the whole ordeal, but I'm fine now! And, of course, to top off the weird day, an incident occurred as we were watching the Broadway show, Wicked. Mid-way through the second half, the theater goes black. I wonder if it is part of a show, and an audience member yells what I am thinking.... "Is this part of the show?" and multiple audience members yell back "No!". There was a fire in a motel in the vicinity, and Entergy was required to shut off the power. We did not get to see the rest of the play, but the two main characters sang one of the final songs A cap ell a. It was a unique experience, but many people were still mad that they didn't get to see the show. We really won't know what the theatre will do until tomorrow.

Sunday rolled around, and we had a nice Easter lunch at Colleen's family's house. And now it's the middle of the night, and I think...

I think too much sometimes. I think whether I'm making a wise move by doing something I know I'm passionate about, or I wonder if I should move on and try something new. I love videogames, love developing, and love problem-solving. But is it something I will make money with? Will I be accepted trying to do this?

My family has shown me a lot of support, especially when it comes to following my dreams. And my wonderful girlfriend has also been doing extremely supportive. But I still feel judged. I'm pretty sure I'm doing it to myself. I'm working on a simple little board game, and I constantly say to myself, this has been done. But it's something that gets me excited, and I want to follow through with this (unlike so many other unfinished projects in my life). I admit, I get depressed sometimes, severely unmotivated at others. I just want to quit, mainly because I'm not making money.

But I won't! It's just how I feel sometime, but I'm strong enough to push through. I need to stop inventing excuses, and just move! I'm almost done, I see the finish line (or at least I see the next "step"). I need to get there. I will get there! The biggest things in my way are my darn thoughts!

- ET

Monday, March 29, 2010

Ranting about Software Piracy

Dear Blog,

I just read an article called Software Piracy - It's Not Right, but How Do We Fix It?

The answer is punishment against those that do it. He says that 75% of people will stop right away (stop dead). LOL! Are you serious? There have been attacks already, so it's been done! Piracy lives, punishment fails. Remember Napster? Remember KaZaa? See PirateBay? Piracy is like a weed, you clip it, it only grows back nastier and heavier than ever.

Sorry, but if I was 100% against piracy, punishment is too uncreative of a solution. Creative solutions could be the game developers themselves distributing "fake" versions of the game on Pirate Bay or something that will delete your save games at a certain date. Haha! Some hackers would be pissed! Maybe have a renaming function in the game for those implementing constant online protection. Like the main character could be renamed IHeartPinkPonies and the end boss could be PinkPony, or something ridiculous like that.

Anyway, what I'm trying to say, punishment will scatter the pirates, but pissing them off will bring them out. But not only that, it may burn them out as they get frustrated with accidently downloading "junk".

As of right now... it's too easy. Jump on a torrent site, start up the program to see if it works, and bam! You got new software! The comments on these torrent trackers help too! They have people saying, "yup, it works" or "don't download this, it's junk".

If you want to hurt piracy, think outside the box and be creative. I think it'll take a pirate to hurt the pirates. But either way, piracy will live.

Last thought: If people would spend half their energy on doing something (creative) about piracy that they use complaining about piracy, I think the whole industry would be somewhere else right now.

- ETdoFresh

Tuesday, March 23, 2010

New Life

Dear Blog,

Did you know that life can be bought for only a few bucks? What!? Alright, well, if you are looking for a cool activity to do with a loved one (spouse, child, girlfriend, whatever), why don't you create some new life?

Colleen and I were at the grocery store, and I decided I needed some mint. I could buy 10 - 15 leaves for 2.99 or I could buy a plant for 2.99. I went with the latter (and got two!). Well this was great! Colleen also bought a upside-down strawberry garden that starts from seeds.

Anyway, then it started getting serious. We cleaned out this huge weed pile we had by the A/C unit, and placed pine needles there and planted flowers. So cheap (like $0.89 for each plant). I also trimmed the fig tree, because it was getting a little to estate hungry (took up way too much room).

Then we bought seeds. We bought a little DIY mini green house, and seeds for all around $10 - $15. I think just growing mint and herbs pays for itself, but with patience, I'm going to try and grow many different things from seeds. I printed cool little graphics and taped it to the edge of the green house (plastic box) so I can tell what's what!

Hopefully we can make beautiful flowers, herbs, and vegetables grow in our backyard. But it's a cheap hobby (if you choose it to be) and you make life in your very own backyard (or your patio pot). I guess I gotta be prepared to take care of them once they start sprouting, until they are strong enough to survive on their own.

- ETdoFresh

Tuesday, March 9, 2010

D.E.A.L.

Dear Blog,

Four Hour Workweek was an interesting read. I have some friends that say it was an OK book, and other's say it was complete bologna (in nice terms). Anway, I gave it a read, and it was a good self-help book to get ya motivated.

DEAL is the acronym the majority of the chapters seem to go through. Define what you want (cost, style, quantity, etc.). Eliminate all the excess activities that don't get you results. The author mentioned Pareto's Principle where 80% of what you are doing is only giving you 20% your output, and vice versa, 20% of what you are doing is giving you 80% of your output. Automate your tasks so you don't have to be part of the machine you call your job. The author challenges everyone to hire a person in India or wherever most economical to gain experience not only automating some mundane tasks, but to gain experience "bossing" someone else around. Liberate your life! Find out what to do with the free time you have. Travel, Vagabond, etc.

Good stuff, but I don't think I'll be able to follow in his footsteps exactly. I like to work, and not really sure if I can define what I want exactly or eliminate all the things I think bring me happiness just yet. Once I get fed up with my career again, I may give this a shot.

- E.T.

Monday, March 1, 2010

How to make a Simple XML Socket Server with PHP and Windows 7 / Vista

Dear Blog,

Today we are going to discuss how make a simple XML socket server using PHP (as a command line server) and Flash as the client. I assume that PHP has been installed with the "sockets plug-in".

First let's associate a new type of file to Windows, called PHS, or PHP Script. (I borrowed the following from this site) Open up a command prompt window and...

ASSOC .phs=PHPScript
FTYPE PHPScript=[path to]\php.exe -f "%1" -- %*
set PATHEXT=.phs;%PATHEXT%

Now evertime you click on a phs file, it should open up in PHP CLI (Command Line Interface).

After that, we simply create a PHS like the following that will run as your server (borrowed from here and tweaked to work here)...

<?php 
echo "Starting XML Socket Server\n";

// Set time limit to indefinite execution 
set_time_limit (0); 

// Set the ip and port we will listen on 
$address = 'localhost'; 
$port = 9001; 
$max_clients = 10; 

// Array that will hold client information 
$client = array(); 

// Create a TCP Stream socket 
$sock = socket_create(AF_INET, SOCK_STREAM, 0); 
// Bind the socket to an address/port 
socket_bind($sock, $address, $port) or die('Could not bind to address'); 
// Start listening for connections 
socket_listen($sock); 

// Loop continuously 
while (true) { 
    // Setup clients listen socket for reading 
    $read[0] = $sock; 
    for ($i = 0; $i < $max_clients; $i++) 
    { 
        if (isset($client[$i]) && $client[$i]['sock'] != NULL) {
            $read[$i + 1] = $client[$i]['sock'] ; 
  }
    } 
    // Set up a blocking call to socket_select()
 $temp = array();
    $ready = socket_select($read,$temp,$temp,NULL); 
    /* if a new connection is being made add it to the client array */ 
    if (in_array($sock, $read)) { 
        for ($i = 0; $i < $max_clients; $i++) { 
   if (!isset($client[$i])) { 
                $client[$i]['sock'] = socket_accept($sock); 
                break; 
            } 
            elseif ($i == $max_clients - 1) {
                print ("too many clients") ;
   }
        }
        if (--$ready <= 0) {
            continue; 
  }
    } // end if in_array 
     
    // If a client is trying to write - handle it now 
    for ($i = 0; $i < $max_clients; $i++) { // for each client
  if (isset($client[$i])) {
         if (in_array($client[$i]['sock'] , $read)) { 
             $input = socket_read($client[$i]['sock'] , 1024); 
             if ($input == NULL) { 
                 // Zero length string meaning disconnected 
                 unset($client[$i]); 
             } 
             $n = trim($input); 
             if ($input == 'exit') { 
                 // requested disconnect 
                 socket_close($client[$i]['sock']); 
             } elseif ($input) { 
     echo "Client $i sends:\n$input\n\n"; 
                 // strip white spaces and write back to user 
                 $output = ereg_replace("[ \t\n\r]","",$input).chr(0); 
                 socket_write($client[$i]['sock'],$output); 
             } 
         } else { 
             // Close the socket 
             socket_close($client[$i]['sock']); 
             unset($client[$i]); 
         }
  }
    } 
} // end while 
// Close the master sockets 
socket_close($sock); 
?>

Double click that file, and you should have an XML Socket Server that repeats whatever you send it.

Now open up flash, and have it connect and send something to the server. If everything works, you should see the response in the trace portion of your flash window. Done! (I included the Flash file I made here).

Hope this helps someone in cyber-world!

- ETdoFresh