?

Log in

[TheTyrant] [entries|archive|friends|userinfo]
[TheTyrant]

[ website | Great Game ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Kinda funny [May. 28th, 2007|03:36 pm]
[TheTyrant]
[Current Mood |boredbored]

So I'm pretty bored at work, and start screwing around with google and the get directions thing for the maps.
Clicked 'Get Directions' and put in Toronto, Ontario to Paris, France.

Apparently Google thinks it'll take me 29 days and 11 hours to get there.
I also have to swim across the Atlantic Ocean. :|

I then decided to see where else I'd have to swim too.  Apparently you have to go through France no matter what.  I stuck in Cork, Ireland, and had to go through France and the UK instead of just swimming directly to Cork.

...yes.  I'm really that bored. :(
Link3 comments|Leave a comment

(no subject) [Feb. 27th, 2007|03:10 pm]
[TheTyrant]
[Current Mood |busybusy]
[Current Music |digitalgunfire.com]

So today, I had to search through a 3GB directory of source code to find some minor, idiotic, typo, that wasn't being listed in my error logs (mostly since it was PG that was bitching). After about 5 minutes I go fed up of trying to find the links between all my scripts and figuring out which script was bitched up.
So I made this Perl script to find the error for me (which it found in about 5 seconds - total run time on about 750MB):


#!/usr/bin/perl -w

use strict;

my (@files, %found);

## call the script, @ARGV Holds our search path, and search string
if($#ARGV != 1) { &Usage(); exit; } ## ensure we've got the required args
my($path, $findStr) = @ARGV; ## place input into our vars

&recurse($path); ## start searching

foreach (@files) { ## for all our found files, open them, and check for our search string
    open(FILE, "$_") || die "Error reading $_: $!\n";
    my @lines =
; ## load all the lines of the file into our array
    close(FILE);

    for(my $i = 0; $i <= $#lines; $i++) { ## for every line, match against the search string
        if($lines[$i] =~ /$findStr/gi) {
            $found{$_} = $i; ## if we found it, put it into a hash
        }
    }
}

if(scalar %found == 0) {
    printf "Could not find anything matching %s\n", $findStr;
} else {
    printf "Found %s in the following files:\n", $findStr;
    foreach (keys %found) {
        printf "String \"%s\" Found in \'%s\' on line %s\n", $findStr, $_, $found{$_}; ## print out the results
    }
}

###############################################################
sub recurse($) {
    my($path) = @_;
    $path .= '/' if($path !~ /\/$/); ## append a trailing / if it's not there

    ## loop through the files contained in the directory
    for my $eachFile (glob($path.'*')) {
        if( -d $eachFile) {
            &recurse($eachFile); ## pass the directory to the routine ( recursion )
        } else {
            push @files, $eachFile; ## push the file into an array
        }
    }
}

sub Usage {
    print "\nUsage:\n";
    print " $0 'Path' 'String'\n";
    print " Ex: $0 '/home/user/' 'hello everyone!'\n\n";
}

exit(0);


I haven't tested this on windows - so if mangles your system, its your own fault.
LinkLeave a comment

Star Trek + Nine Inch Nails [Feb. 14th, 2007|12:08 pm]
[TheTyrant]


*pees pants laughing*
Link8 comments|Leave a comment

(no subject) [Nov. 24th, 2006|09:25 am]
[TheTyrant]
I have a lot of geek friends. Of these geek friends, only one knows Perl, and its half assed.

I need someone with a bit of Perl experience to help me finish this fucking software package I've been working on for the past two years.
Once this can finally be shipped to the 5 clients that want it, (by spring...), so far I can then give a percentage to whoever helps me.

Anyone?
Link2 comments|Leave a comment

(no subject) [Nov. 2nd, 2006|08:19 pm]
[TheTyrant]
blarg.

Anyone in Windsor looking for a roommate, or knows someone that isn't an ass and looking for a roommate?
If you do, let me know. My sister needs a residence for at least the next two months so she can finish her semester at school.
The present place shes at, had the bank forclose on their house. My parents have left me with the task to situate her in a new closet. So, contact me: tyrant_23 at that hotmail place with the dot commie at the end if you've any ideas.
LinkLeave a comment

(no subject) [Oct. 27th, 2006|06:20 pm]
[TheTyrant]
I think I want to go to Concordia now. Toronto sucks the gay straight out of Dan's ass.
LinkLeave a comment

Wheeee [Oct. 11th, 2006|04:19 pm]
[TheTyrant]
[Current Mood |*head asplode*]
[Current Music |Nine Inch Nails - The Collector]

To continue with the festivities of the day:
You're all fired.

If you want to know why, ask the four people I fired before you.
Link10 comments|Leave a comment

I'm Sweating Monkeys :( [Jul. 31st, 2006|05:53 pm]
[TheTyrant]
[Current Location |Toronto...wtf is with this silly location thing?]
[Current Mood |happyhappy]
[Current Music |Real Synthetic Audio (www.synthetic.org)]

24 for one day now. Had a good birthday again this year. Thanks to everyone who called/email/etc! I really appreciated it :)

For those that didn't...*plots*...kidding :D
Well...plotting still commences against my parents for lack of calling...
Link9 comments|Leave a comment

Thought it was interesting [Jul. 9th, 2006|07:16 pm]
[TheTyrant]
[Current Location |In your closet]
[Current Mood |lonelylonely]
[Current Music |NIN - Wish]

(Click here to post your own answers for this meme.)

I miss somebody right now. I don't watch much TV these days.  (Crap + Comercials = gh3y like Dan) I own lots of books.
× I wear glasses or contact lenses. × I love to play video games. I've tried marijuana.  (...this is just a stupid question)
I've watched porn movies.  (Even Showcase has been getting better :p) I have been the psycho-ex in a past relationship. × I believe honesty is usually the best policy.
I curse sometimes.  (Every second fucking word) I have changed a lot mentally over the last year. × I carry my knife/razor everywhere with me.
it goes on...Collapse )
LinkLeave a comment

Doooom [Jul. 2nd, 2006|06:08 pm]
[TheTyrant]
[Current Location |wtf is this? in toronto..?]
[Current Mood |]
[Current Music |DigitalGunfire.com]

So, I'm coming to Windor on the 14th.
Parents moving to Alberta by the 20th. (yay!)

Will visit people. Will go drinking. Will celebrate not having to deal with my parents anymore since their too cheap to call me ;D

In other news....Going to Ryerson for Computer Engineering in the fall.
I am accepting moneytary donations for this venture. Or beer.

Finishing migrating my network tomorow.

...thats about it.
Link7 comments|Leave a comment

navigation
[ viewing | most recent entries ]
[ go | earlier ]