Archive for January, 2007

Launch Delayed

Penguin January 31st, 2007

Originally, we had intended to launch the true face of Ninja vs Penguin this past monday (1/29), but delays in development and Penguin’s busy schedule at work has forced us to push back our launch by a week.
We’ve cut back on some of the features, but we’re going to do our best to put them into ver 1.5.

If everything goes smoothly, you’ll be able to see what NvP is truly all about.

Get ready, this is going to be one crazy ride!

Related posts

What is Leadership?

Penguin January 29th, 2007

In today’s world of failing CEOs, there’s a need for a new generation of great leaders. But what does it really take to be a great leader? In order for us to answer that question, we need to define what a leader is. I think leaders can be broken down to two groups: entrepreneurs and role models.

Entrepreneurs

These are your visionaries. People who think bigger and beyond themselves. They may not necessarily know every step it will take to get to their destination, but they will make steps towards it. People like JFK who had a vision of putting a man on the moon.

It’s not enough to have just vision. A truly great entrepreneur needs to have passion. Their believe in their vision is so fundamental, that they’re willing to take steps outside of their comfortable place in life and try and make their vision a reality. Kevin Smith had passion. He maxed out all his credit cards to fund Clerks.

Finally, discipline. Despite the hardships and the failures, the great leader will look towards the ultimate goal and their ultimate purpose and not give up hope. Sometimes, over the next mountain is the sun.

Role Models

Then, there are the role models. These people lead as examples with their lives. Whether it be through exceptional kindness and generosity, or the hurdles in their personal lives that they had to over come to achieve success, whatever that means.

Sometimes there’s nothing exceptional about these people. They don’t have millions of dollars or tremendous fame. These may be your brother, your sister, your father, your mother, or even someone you just kind of know. But they’re living the sort of life that you wish you were living. And sometimes, just living is hard enough.

Great Leaders

So, what makes a great leader? An entrepreneur that’s also a role model. In order to be truly great, you must posses all these qualities. Vision, passion about your vision, discipline to bring your vision to life. The ability to live every day with integrity and character.

How does someone become a great leader? They work at it. They examine their failings and try better next time. They take criticism with kind words and receive praise with thankfulness. They are not perfect, but do the best they can to be the best they can.

Are you a great leader?

Related posts

Getting mod_rewrite to Work on Apache2

Penguin January 23rd, 2007

mod_rewrite is a godsend for any web developer who wants to make pretty URLs. Unfortunately, the documentation to get mod_rewrite working on Apache2 isn’t all that plentiful.

Most of the guides tell you to insert or uncomment the following lines in your httpd.conf file

LoadModule rewrite_module modules/mod_rewrite.so
ClearModuleList
AddModule mod_rewrite.c

If your Apache server was like mine, this will give you a Failed to start error. If you remove the “AddModule mod_rewrite.c” line, then Apache will start again.

The Solution:

Make sure you have the following line uncommented in your http.conf

LoadModule rewrite_module modules/mod_rewrite.so

Next, scroll through your httpd.conf file until you see the following block

Options FollowSymLinks
AllowOverride None

A few lines under that, you should see this line

<Directory “C:/Apache/Apache2/htdocs”>

If this is your test server on your local machine, you can go ahead and just edit the commands within this block. Otherwise, you’ll have to create a new directory block like this

<Directory “C:/Apache/Apache2/htdocs/mydirectory”>

Where “mydirectory” is the directory you want to change the settings for.

Within this block, you’ll find the following

AllowOverride None

What this command does, is enable and disables different directives in your .htaccess file. If you change it to “AllowOverride All”, it will enable everything, especially mod_rewrite.

Once that line is changed, save your httpd.conf file and restart Apache.

You should have a fully funtional Apache with mod_rewrite goodness. In order to test the changes, try putting the following into your .htaccess file. **Warning! DO NOT test this if you are expecting any sort of traffic.

RewriteEngine ON
RewriteRule .* – [F]

Depending on server config you may need either or both of the following:
AllowOverride FileInfo
Options +FollowSymLinks

So, your final file may look like this:
AllowOverride FileInfo
Options +FollowSymLinks
RewriteEngine ON
RewriteRule .* – [F]

This code will return a “Forbidden” page for every address you put in.

Happy coding!

Related posts

Recieved Tubes

Penguin January 23rd, 2007

We received our first order of shipping tubes today! Even if the website isn’t 100%, the prints are still going out.

Related posts

First Order of Prints

Penguin January 23rd, 2007

We put in the first order prints for a total run of 300. I’m really proud of the work and effort and love Ninja put into them. Hopefully, you’ll all love them just as much!

Related posts

Google Now Owns the Internets

Penguin January 22nd, 2007

Sneaky, sneaky, Google:

Google controls more network fiber than any other organization. This is not to say that Google OWNS all that fiber, just that they control it through agreements with network operators. I find two very interesting aspects to this story: 1) that Google has acquired — or even needs to acquire — so much bandwidth, and; 2) that they don’t own it, since probably the cheapest way to pick up that volume of fiber would be to simply buy out any number of backbone providers like Level 3 Communications.

Needless to say, this is all kind of scary. As much as I use and love Google products, the more I fear that they will become that evil corporate giant that they don’t want to be.

Please be gentle, Google.

Related posts

Fixed Commenting

Penguin January 21st, 2007

It turns out it was a simple problem. I forgot to turn on “any user can register”. So if you want to comment, register to NvP!

Related posts

CakePHP Install: Multiple Subdirectories & 500 Error

Penguin January 21st, 2007

So, the last few weeks, I started learning how to use the CakePHP framework. It’s been a little slow going, but it’s been pretty good. I’ve been developing on my local machine, which, for some reason, mod_rewrite just refuses to work. So, I decided to make a dev site on the server. Oh, what a disaster.

I created the directory and ftp’d all the files on to the server. When I went to test it, I kept on getting a bunch of 500 errors. I tried moving the files around, looking at the “manual”, but nothing was solving the problem. I spent all afternoon, and narrowed it down to a problem with the .htaccess file.

When I came back from dinner, I found the solution.

The Problem:

  1. Installing CakePHP in a subdirectory;
  2. Resolving the 500 errors.

The Solution to Problem 1:
The original manual entry for this, wasn’t very good. I eventually found a tutorial in the bakery that did a better job of explaining how to do it.

Essentially, what you had to do was change 3 Define statements in /apps/webroot/index.php.

First, you create a directory above /public_html called /apps. Within the /apps directory, you put different subdirectorys for your different applications, (ie: gallery, blog, etc). For this example, we’ll use “blog”
Next, you put the /cake and /vendors directory above your /public_html directory.

Then you create a directory in your /public_html named after your application, /blog.

Finally, you move the entire contents of your /apps/blog/app/webroot directory to /public_html/blog

This is what your folders should look like, if you are looking at from the user root:

/
/apps/blog <- contains: config, controllers, models, plugins, tmp, vendors, views. Notice it does NOT contain webroot
/cake <- contains: core CakePHP files
/public_html/blog <- contains: /app/webroot
/vendors

The next step, was to open your /public_html/blog/index.php (originally in /app/webroot) file. You’ll scrow down to about line 41 and see the following (comments removed):

if (!defined(’ROOT’)) {
define(’ROOT’, dirname(dirname(dirname(__FILE__))));
}
if (!defined(’APP_DIR’)) {
define(’APP_DIR’, basename(dirname(dirname(__FILE__))));
}
if (!defined(’CAKE_CORE_INCLUDE_PATH’)) {
define(’CAKE_CORE_INCLUDE_PATH’, ROOT);
}

The first define describes the root of all your different applications. In this case, it will be /apps. The second define specifies the directory of the application core, in this case “blog”. And the last define establishes where the core CakePHP files can be found.

The way that these 3 defines work, is they set some php classpath includes. In other words, when PHP runs CakePHP, it will look in these 3 places for the required files. What that means to you, is you need to determine what the full, absolute path is. In my case, the full path to MY root directory is: /home/ninjavspenguin.

Editing the code above, I will get the following:

if (!defined(’ROOT’)) {
define(’ROOT’, DS.’home’.DS.’ninjavspenguin’.DS.’apps’);
}
if (!defined(’APP_DIR’)) {
define(’APP_DIR’, ‘blog’);
}
if (!defined(’CAKE_CORE_INCLUDE_PATH’)) {
define(’CAKE_CORE_INCLUDE_PATH’, DS.’home’.DS.’ninjavspenguin’);
}

It’s important to use the directory separator for portability and compatibility.

Notice the third define, it’s not saying where the core files are, but where /cake can be found.

And that was it!

The Solution to Problem 2:

For the life of me, I had no idea why I was getting 500 errors. I narrowed it down to a problem with the .htaccess file, but since my mod_rewrite skills are not 1337, I didn’t know how to debug it. I eventually found this google group that had the answer.

It turns out, that there are three key .htaccess files that CakePHP uses to do all its pretty URLs.

First: in the core cakephp directory
/cake

contents of .htaccess (unedited)

RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
Second: in the app directory
/apps/blog

contents of .htaccess (unedited)

RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
Third: in the webroot directory
/public_html/blog
contents of .htaccss (unedited)

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

And that was it! My 500 woes were over!

Hopefully, this has will fix your issues.

Related posts

Links Fixed

UPS or Fedex?

Penguin January 19th, 2007

I started looking up shipping costs between UPS and Fedex. Based on my initial investigation, UPS will cost, at most $7.02 for a 1 lb package and Fedex will cost, at most $4.81 for a 1 lb package; both within the continental US.

So, the consideration now is, what kind of services do UPS and Fedex offer? Both in terms of API for the backend and service for our customers. I know that I don’t want to pay $7 + handling, but if UPS offers better services, we may end up going down that route.

This is not to say that we can’t change suppliers, but I want to make the best decision for our customers early on.

Related posts

Next »