Firefox Config

Posted by John
on Thursday, 20 November 2008

to access the Firefox Configuration area, type this into your address box and hit enter...

about:config

If you completely screw things up you can reset to the defaults by...

  • Start Firefox in Safe Mode
  • Check the Reset to Defaults box
  • Click the Make Changes and Restart button

Tuning your SVN Deployment

Posted by John
on Thursday, 23 August 2007

One of the problems you may run into with a project that has been deployed with SVN is choosing what it should ignore so that the production app does not fall over itself.

E.g. accidentally putting log files under version control and then deploying them to the server knowing your box will alter these over time.

So how can you get around this, pretty simple really; but first off try the following commands...

Reverting a Directory

svn revert log/*

This basically tells svn to revert everything in the log directory to it's previous state.

Ignoring .log files

svn propset svn:ignore ".log" log

This tells svn to ignore any .log files within the log directory, so the log files generated on your production box aren't the ones from your laptop.

Ignoring mongrel .pid's

svn propset svn:ignore ".pid" pid

This like the command above will ignore the .pid files generated on your laptop, not taking these to your production box.

Ignoring the contents of a Directory

To go one step more, how about when you want the entire contents of a directory ignored from SVN. So say the photos generated on your production box don't get overwritten from your development laptop.

svn propset svn:ignore '*' photo

Enjoy,

DNS Mastery + Google Apps

Posted by John
on Sunday, 29 July 2007

DNS = Domain Naming Service
p. …quite simply the glue that ties your newly purchased .com to your server’s hardware.

There’s a few other bits to it, like the Name Server, or the original Domain Name Registrar (e.g. godaddy.com); they’re a little more involved but I’ll try to cover them here.

Buying your Domain Name

First off, go buy your new domain name at one of the domain name registrars. I’ve suggested godaddy.com purely because they’re so cheap, but you can use any other.

Next once you’ve bought your domain name, go in and you’ll be able to point it to a naming server. This connects your .com to the server containing your dns details and thus to your meat & potatoes server box.

So for this example, we’ll use SliceHost (although you can use the free DNS provider FreeDNS who provide the service free of charge, I’ve used and are really good.

Go to your DNS provider and they’ll provide you with a list of nameservers you can use.

e.g.
bq. ns1.slicehost.net
ns2.slicehost.net
ns3.slicehost.net

Go to your domain registrar and in the nameserver provider part, enter these three (3 for automatic failover, one fails the other takes charge, etc.).

Creating your DNS records

Now we’ve got the .com pointed to the DNS provider that will host our DNS records, let’s go create some.

So, for SliceHost, go to the DNS Records section, click ‘advanced view’ (specifically for slicehost); and now We’ll begin.

Create a record for each one of these

type: A

name: www

data: (ip address of your serverbox)

type: A

name: mysite.com.

data: (ip address of your serverbox)

Note the . at the end of the one above (DNS records always have a fullstop at the end), and that it doesn’t have www. at the start.

Next we need to tie the domain name to the name server for a sort-of reverse lookup. So create records like…

type: NS

name: mysite.com.

data: ns1.slicehost.net.

type: NS

name: mysite.com.

data: ns2.slicehost.net.

type: NS

name: mysite.com.

data: ns3.slicehost.net.

Notice the fullstop at the end of the Name and Data part.

Unfortunately now we have to wait for these settings to propogate thru the web, can take up-to 48 hours but usually quicker (try doing this at midnight in the UK).

Using Google Apps for your Email

Now we’ve got the site hooked up to the server box, how about email?. Well, you could install an exchange mail server on your box but they’re usually a nightmare for the beginners; so how about we use Google Apps & GMail?.

Google Apps is a new free service google has launched to provide home users and small business with a way of having standard google tools but tied to their domain name. So you can have john@mysite.com be your email address but use Google GMail to handle it without building an exchange server; big headache gone.

Go to the Google Apps website and register for the free Standard service. Use your new domain name mysite.com and create an email account for it.

You’ll need to verify your site with Google to turn the service on, quickest method is to put an HTML file on your server’s /public web directory and click VERIFY.

Once done go back to SliceHost / Your DNS provider and create a new record,

type: MS

name: mysite.com.

data: ASPMX.L.GOOGLE.COM.

auxilary info: 1

..the 1 is the priority level, Google will probably tell you to create more of these but for now one will do.

Now once google shows your site as Verified all the services (calendar, excel, start page, etc.) will switch to Active. Setup your Email part and tell it you’ve done the MX record change and it’ll switch to Updating. Now wait 3-48 hours for it to check the MX record on your DNS provider.

If all ok, that’ll go to Active, send an email to the address to check and it should work.

Using shorter URLs for Google Apps

As you’ll have worked out, Google doesn’t give you the best web addresses to access your Google Apps email, docs, etc.

To make this more simple, go to each service in your Google Apps Dashboard and click ‘change url’, pick the one it gives you (usually mail.[mysite.com], etc. ) and click ok.

It will then tell you how to adjust your DNS settings appropriately, but to make this simpler, login to your DNS control panel in SliceHost (or whatever DNS service your using) and add some CNAME aliases.

type: CNAME

name: mail

data: GHS.GOOGLE.COM.

type: CNAME

name: start

data: GHS.GOOGLE.COM.

type: CNAME

name: docs

data: GHS.GOOGLE.COM.

type: CNAME

name: calendar

data: GHS.GOOGLE.COM.

CNAME records basically act like an alias pointing to your core domain. So adding a record with a name of ‘mail’ will suddenly redirect anything with mail.mysite.com to the location you put in data. Once done, it should take effect in 1-3 hours.

Final Points

A name records are much like CNAME records only they have a lesser performance impact, however if you are gonna create some more like blog.mysite.com I’d stick to CNAME’s; only create one A record for your www => www.mysite.com connection.

Drop me a line if you get stuck,

All the best,

John.