Phone: + (702) 966.5500
Fax: + (702) 993.6900

Blog

If you go pretty much anything with data, learning the tar command is going to be worth your while. But suppose you do things with lots and lots of heavy data?

Well, one trick you’ll want to add to your arsenal is the –-exclude option.

Let’s say you want to tar a site with a ton of images in the image folder. So much so that it would take all night to tar that image folder… we’re talking really big.

Were there’s a will there’s a way. You can simply exclude the unwanted baggage and tar the rest by using --exclude.

It works like this…

Let’s say you want to tar the Green Crescent site, but let’s image that there’s that HUGE image folder located at /sites/all/files/images .

It’s really just this simple…

tar -pczf  greenCresent.tar.gz /httpdocs --exclude "/httpdocs/sites/all/files/images"

This will tar the whole site (which is located in /httpdocs) into a tar.gz file called greenCresent.tar.gz but won’t include the directory /httpdocs/sites/all/files/images.

The same works for individual files. To exclude more than one file or directory, just add more -- excludes.

For reference, here’s a bit more about some of the more common .tar commands.

c – create a new archive.
t - list the contents of an archive.
x - extract the contents of an archive.
f - the archive file name is given on the command line (required whenever the tar output is going to a file)
p – preserves the permissions.
v - print verbose output (lists file names as they are processed).
u - add files to the archive if they are newer than the copy in the tar file.
z - compress or decompress files automatically.

more »

Just add this to your CSS file (which should be somewhere in a subfolder of /sites/all/themes/yourTheme/)

#node-form .tips, .tips + a, .tips + p {
        display:none;
}

ul.tips {
        display:none;
}

more »

We use suPHP on all our servers because it makes them so much more secure.

That said, suPHP and Drupal 6 don't always get along well with one another. The Image Cache module seems to be especially problematic on this point.

The essential problem is that when the system creates a new directory, it does so using the wrong permission setting, or chmod. In our case, the system sets directory permissions to 700 making their contents inaccessible.

Here's a little command you can run to clear the issue up manually. Just navigate to /sites/default and then run this little gem:

$ find files -perm 700 -print -exec chmod 755 {} \;

This tells Linux to change the contents of the files directory from 700 to 755 (the magic number for directories on our servers.

more »

It's a good idea when you're building a test site to password protect it.

Other times, there are sections of one's website that needs to be restricted to certain users.

Since our platform of choice has a very granular set of permissions baked in that allow you not only to restrict a access to a directory or page, but can be extended to restrict access to individual page elements depending upon user role (and even down to the user, IP, and virtually anything imaginable) this blog is focused primarily on the importance of password protection during the web development process and more so... how to do it.

Protecting your development site is beneficial for several reasons. If you have some hot idea and don't want your competitors to see what you're doing its a great idea. It's also a great idea if you don't want a client to see their new site in a state of mid-development and get the wrong impression.

Along with the use of a robots.txt User-agent: * Disallow: / password protect also helps keep robots, spiders, hackers, and scrapers out.

How to Password Protect a Website

The first thing you'll need to do is stick this bit of code in your .htaccess file.

AuthName "Restricted Area"
AuthType Basic
AuthUserFile /var/www/vhosts/.htpasswd
AuthGroupFile /dev/null
require valid-user

Your .htaccess file should be located in your website's root folder. If not, just make one using a text editor, stick the above code in, and dump it in the root. Note. the . before the htaccess makes the file invisible on some systems. If you're using ssh, you can see hidden files using this little command ls -a.

The part you need to pay attention to is this bit: /var/www/vhosts/.htpasswd

That's because you need to change it according you the structure of your server. That is, this is the path to where the password file is held, it tells the server to... more »

When it comes to web development, oftentimes less is more – something that may seem counterintuitive in a culture where bigger is almost always considered better.

The smorgasbord of free modules that the better CMS’s have on offer can make the temptation to indulge immense. Our preferred CMS, Drupal, for example, has well-over 10,000 free modules available for download.

Dueling clichés aside, site bloat often leads to very real problems.

Fancy extras need constant maintenance, can make your site load slowly, or even crash your whole server.

It’s often tempting to pack in more and more functionality just because you can. See featureitis.

Look at it this way… you wouldn’t hang fuzzy dice from your rear view mirror would you? Why hang the equivalent of fuzzy dice on your website.

Among the best web developers, it’s a badge of honor to say one’s solution uses the least lines of code possible. As a project manager, I take pride in being able to build a website that meets the same objective with 40 modules when other developers had to use 80.

A bloated, maladroit website that goes well beyond its purpose leads to diminished focus, unhappy clients, and misspent resources. At worst, it can kill a website’s potential.

Green Crescent will never encourage clients to add all sorts of stuff they don’t need just to bill more hours. On the contrary, we take pride in our efficiency. We succeed only when our clients succeed.

Just something to keep in mind…

more »

Bounce rate is a popular metric used by Google Analytics and similar statistics accumulators to measure the “stickiness” of your website. The notion of what constitutes a good bounce rate is rather controversial and so I wanted to add a bit to the discussion, as it is often the source of confusion to newbie webmasters (and often to people that should know better, too).

What is a Bounce Rate?

Google defines Bounce Rate thusly:

Bounce rate is the percentage of single-page visits or visits in which the person left your site from the entrance (landing) page. Use this metric to measure visit quality - a high bounce rate generally indicates that site entrance pages aren't relevant to your visitors...

http://www.google.com/support/analytics/bin/answer.py?answer=81986

While I have no doubt a website’s bounce rate is an important factor in Google’s ranking algorithm, I utterly disagree with the universal applicability of this bit (or even that it's generally true):

“a high bounce rate generally indicates that site entrance pages aren't relevant to your visitors”

I would argue that the opposite could also often be true, it depends greatly on the specifics of one’s target market as well as a website’s architecture.

A high bounce rate could mean as Google indicates, “that site entrance pages aren't relevant to your visitors” or it could well mean that the page was exactly what a visitor is looking for. The bounce rate metric doesn’t tell you.

(Google, of course, knows more than it shares with you because Google knows what visitors do after they “bounce” – if the user keeps searching for the same keywords, that’s a somewhat better indicator that what they found wasn’t what they were looking for (though it could mean they just want more).... more »

Drupal is a powerful CMS and does a lot of wonderful things. However, just because the folks behind Drupal are genius coders or system architects doesn't mean they know the first thing about SEO. In fact, there are so many SEO issues with Drupal that they almost merit their own section.

In this installment, we're going to discuss a MAJOR flaw in the robots.txt file in Drupal 6 up to 6.19. What was it?? It was this little line:

Disallow: /sites/

While innocent looking enough, this little line in your robots.txt file is a real traffic killer.

Since the Drupal core and most modules (and especially anything and everything that has to do with CCK) store all your images, PDFs, etc, in the /sites/default/files folder, what this line does is prohibit search engines from accessing this important content. This means no PDFs, docs, or spreadsheets in the search results, no images in Google Images, and so on. If you have a site that depends heavily on this variety content, this little line could be the difference between a successful site and a complete and utter failure.

Since everyone's site is different in terms of what they may want to allow and disallow, I don't have any specific advise about other than to consider every folder individually. Here's an example of our robots.txt for guidance.

more »

A new tool by Google, Page Speed Online http://pagespeed.googlelabs.com/ let's you test your website's page load speed. It seems to be a much nicer and more extensive tool than others such as YSlow. I guess it will be included as part of Google's Webmaster Tools soon.

I ran a test on our sister site http://greentranslations.com/ and got a Page Speed Score of 92 (out of 100) with a few useful Low priority suggestions from Google with specificity regarding exactly what we can work on. Just awesome!

more »

Ahh, the power of wget. Probably my favorite shell command of all. One of the many cool things you can do is to download an entire website with wget - images, css and all - right to your local computer. And it's pretty easy... you just need to open your ssh client, in my case Terminal. Navigate to where you want the downloaded files to go and run a wget command something like this:

$ wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains thewebsite.com --no-parent www.thewebsite.com

Note: $ is the prompt so you wound't need to include it

There are several options that you may find useful when downloading a website with wget. They are

  • --recursive (this command allows you to download all the files and folders)
  • --page-requisites (this command allows tells the system to include all the elements of the website such as images, CSS, and other files.
  • --domains thewebsite.com (a useful command that tells wget not to look outside of the thewebsite.com for files.
  • --no-parent (another useful command that tells wget not to follow links outside the specified domain.
  • --html-extension (allows you to save the site as easy to open .html files on your local machine.
  • --convert-links (another great command, it tells wget to convert all the links in the site so that they work for your local machine).
  • --no-clobber (tells wget to not overwrite files that already exist).
  • --restrict-file-names=windows (this command makes sure the file names are compatible with Windows. Solves the problem of ? in URLs.
  • --no-host-directories (disables the creation of host-prefixed directories)
  • --no-directories (doesn't create a hierarchal directory structure, rather dumps everything in the current directory. Happily, it doesn't overwrite files with the same name, but appends an .n)

Where to Get wget

wget isn't something that comes native... more »

Split testing is a basic tool of optimization on the web whose end goal is typically to get users to increase their clicks on ads in given ad space. It can be used in any online advertising context, however it has become an essential tool in managing Google AdWords campaigns. Without proper split testing, it's likely you'll piss away your money on an AdWords campaign faster than at the roulette table in Vegas.

How Does Split Testing Work?

In the design realm, split testing can have numerous variables to test such as placement, color, font, text size, styles, visual images, etc. In the realm of online advertising such as the case of Google AdSense, the variables basically boils down to which text works best.

It's really pretty simple. Other things being equal, meaning that the landing page, ad position, etc. are equal, split testing can tell you which title and ad text are more effective. Create two ads, and then analyze the click through rate (CTR) of each over a sufficiently large sample size as to be statistically meaningful. Jettison the ad with the lower CTR and create a new ad and repeat until you are satisfied that you've maximized your CTR.

That's about all there is to it (though sometimes the results are pretty surprising).

more »

Clients

Resources

Media