2010
10
Apr
Category: Misc, News, Self, Website

Yesterday was CSS Naked Day. CSS Naked Day was thought up by Dustin Diaz. The purpose of CSS Naked Day is to to promote Web Standards; including proper use of XHTML, semantic markup, and a good hierarchy structure. In other words it disables your CSS for for a 24 hour period in order to promote web standards.

I forgot that yesterday was CSS Naked Day. So when I went to my site, I was pissed that my site was jacked up. My first thought was that my site was hacked. The styling was gone but all of the content was there. Which didn’t make sense why a hacker would do that. That I realized what happened.

That was my first CSS Naked Day that I participated in. It was pretty cool. Click on the image to see a screenshot of my site during CSS Naked Day. Also, a “thank you” goes to Aja Lupas for creating the Wordpress CSS Naked Day plugin that I used.

2010
18
Mar
Category: Misc
Tags: ,

The word “few” is commonly used to describe an amount. Though many people assume when someone says “few”, they mean 3 or in the neighborhood of 3 of whatever they are referring to. There is not a specific number that represents the word “few.” It gives a rough idea of the total amount.

So I have come up with a few more types of words that can describe an amount:

couple few:
More than a few, but not by much. This could be double the amount of what “few” typically refers to. For example, “I have a couple few pairs of shoes.”

crap load:
A large amount, but not large enough that it is not under control. For example, “I have a crap load of debt!” As in the example, this would generally be an exclamatory statement. Emphasis can be added to the word “crap” to imply even more than what “crap load” would typically imply.

shit ton:
An very large, almost unbelievable amount. This amount would generally describe a very, very large number. For example, “There is a shit done of dust in the attic!” As in the example, this would generally be an exclamatory statement. Emphasis can be added to the word “shit” to imply even more than what “shit ton” would typically imply.

All of these are context-sensitive amounts. If someone says, “There are a shit ton of people on the planet Earth,” you would assume “shit ton” is roughly 6,800,000,000. On the other hand, is someone says, “I lost a shit ton of weight.” You would never think they lost 6,800,000,000 pounds. Instead, the amount of “shit ton” would take into account their current weight. Since it is a good, round number, let’s say 200 pounds. In this case, “shit ton” would mean they lost roughly 150-200 pounds they previously had.

2010
09
Mar
Category: Mac, Self

I guess I never noticed it, but I have a lot of menu icons! In order from left to right is:

Adium
Waveboard
Tweetie
BetterTouchTool
Alfred
Dropbox
Google Notifier – Calendar
Google Notifier – GMail
Caffeine
MobileMe Sync
Time Machine
Bluetooth
Wireless
Audio/Volume
Time
Spotlight

Check out a screenshot of all of them on my desktop:

2010
07
Mar
Category: Mac, Self
Tags: , ,

After almost a month without a laptop, I finally got one again. You’d be surprised how much wish you had a laptop when don’t have one. It is a 15″ Macbook Pro. 2.66 GHz processor. 4Gb RAM.

Now I get to go through and install all of the software and set up all of my preferences.

My home command center is almost complete!

2010
06
Mar
Category: Mac, PHP, Website

This took me three days to figure out so hopefully this saves someone else a little bit of time.

The most common use of .htaccess files is removing file extensions, such as index.php, from a website URL. They are much ore powerful than that though. I’m not going to go into the details about what .htaccess files can do, shouldn’t be used for, best practices, or anything else like that. I’m going to show you how to get .htaccess files set up and working with MAMP.

The only requirements are that you have a Mac (that’s the first ‘M’ in MAMP) and the MAMP software already installed. I am using the latest version. MAMP will install everything else you need (Apache, MySQL, and PHP which is ‘AMP’ in MAMP) to get up and running so you can start making your own sites locally.

First and foremost, the location of your website files in MAMP need to go in /Applications/MAMP/htdocs/ That may sound like common sense but that’s what took the longest for me to figure out. I had my files in /Applications/MAMP/bin/mamp/ which is where all of the files for the start page is located. I just made a folder inside there and was going to the site at http://localhost:8888/MAMP/myfolder No matter what I did, the .htaccess file would not work at all from within that directory. So make sure your websites files are in /Applications/MAMP/htdocs/ or a folder within.

The next thing you need to know is ‘htaccess’ isn’t the file extension and there isn’t a file name on the file. The dot at the front typically means it is a hidden file on Unix based operating systems (which the Mac is). So you will need to show the hidden files on your machine. There are a few ways to do this. One of the easiest ways is to use a Dashboard widget. Hidden Files Widget is a great widget for this. If the hidden files are hidden, the button will say ‘Show’. If the hidden files are visible, the button will say ‘Hide’. It can’t get any more simple that that. Install the widget then click the ‘Show’ button. Sometimes the desktop icons won’t come back automatically. If they don’t come back after a minute, click on the Finder icon in the dock and they should come back. Now, go to wherever your website files are located. If there is a .htaccess file in the folder, skip the next paragraph. If it is not there, read the next paragraph.

Here is the catch. It’s tough to create a .htaccess file because the Mac thinks ‘htaccess’ is the file extension but you didn’t give the file a name. So it won’t just let you do it. Wordpress creates a .htaccess file for you when you set up a blog locally. I believe Drupal does the same thing but I’m not 100% positive on that. Other applications possibly do as well. If you aren’t installing a CMS like that, you can always create a custom one and download it. Below is a very basic example of a .htaccess file that I typically use. Once you have a .htaccess file, put it in the root of where your website will live.

The .htaccess file can be opened with TextEdit. You can open it with Dreamweaver or almost anything you want. Here is an example of a typical .htaccess file

1
2
3
4
5
6
7
8
9
10
11
# BEGIN My_Website
<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /
	RewriteBase /mywebsite/
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule . /index.php [L]
	#RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
# END My_Website

The hash marks (#) are comments. I’ll talk a little about the second and third commenta in a second.

If you are developing a site locally, your files may not be in the root of the /Applications/MAMP/htdocs/ folder since you may be working on more than one website. That is what the RewriteBase is for. It specifies where the root of your website is in accordance with the root of the domain or local root. In this example, my website and it’s files are in a folder called mywebsite which is inside my /Applications/MAMP/htdocs/ folder. Since /Applications/MAMP/htdocs/ is my root folder, I don’t have to put that in the path. I just have to put the path from the root folder. If you notice, on the line above that (line 4), I have commented out that line with a hash. When you upload the files to your website, uncomment this line (line 4) and comment out the line after it (line 5). That way the .htaccess file works when you get it on the actual site. If you are not uploading the files to the root of your website, set the path accordingly.

The third comment (line 9) is a variation of the line above it (line 8). Both work pretty much the same. You don’t have to have the first and last comment lines. You can delete them and it won’t effect anything.

That is literally all I had to do to get the site working. I saw sites that wanted me to edit httpd.conf files and php.ini files and all kinds of files under the sun. I didn’t have to though. If you do need to mess with those files, there are a couple pretty good walkthroughs to help you out here and here.

2010
05
Mar
Category: Misc, Self, Work
Tags: , ,

I have some kind of obsession with Darth Vader. I don’t even like the Star Wars movies, but I really like Darth Vader. At work, they changed my name of my phone to say ‘Darth Vader’. So when I call someone, their phone says like Darth Vader is calling them. How cool is that!