Monthly Archive for April, 2008

Website compression

I just found a helpful article about compressing website pages automatically using .htaccess here.  This reduced my page size by at least 75%, a big (and safe) help for viewing pages fast.

My next search was for a WordPress caching plugin.  I am currently testing WordPress Super Cache, which has been updated to work with WP 2.5.  However, it has a complicated setup and clashed with the .htaccess rules I already have setup for the rest of my website.

I've been testing other .htaccess rules to enable GZIP or Deflate for all files, but haven't yet found the perfect configuration.  If I do, I'll post it here!

Computer viruses

I think computer viruses should count as life. I think it says
something about human nature that the only form of life we have created
so far is purely destructive. We've created life in our own image.

Stephen Hawking

Gmail spam

I've recently had my Gmail updated to the new interface, which I like (although loading it sometimes freezes Firefox briefly).  However, I used to have a script that hid the Spam counter, which now no longer works.

After investigating various other scripts, I found a much more elegant solution: Gmail – Mark Spam Messages as Read.  This does what it says on the tin, works well, and without changing any of Gmail's CSS.

Assurance

I had a long conversation last night with a good friend about various theological topics.  Some of them will find their way on here, in time.  The first of them is the doctrine of assurance.  How can we be confident that we are saved?  Is such confidence possible?

For Methodists, 'assurance' historically refers to a feeling of peace and joy that our sins are forgiven.  An example might be John Wesley's famous line, 'I felt my heart strangely warmed.'  He goes on to say:

I felt I did trust in Christ, Christ alone, for salvation. And an
assurance was given me that he had taken away my sins, even mine, and
saved me from the law of sin and death.

Assurance of God's love

On this understanding, assurance is the feeling that accompanies faith in God's promises.

The difficulty is of course that feelings can mislead us.  It is entirely possible for someone to feel 'assured' of their salvation, without having the accompanying faith.

It is therefore perhaps more helpful to talk about assurance in terms of faith.  God has promised that those who believe in him will have eternal life, that if we believe in the salvation won for us by Jesus on the cross, we will be saved:

It is not possible for someone to be genuinely broken by sin, genuinely
to believe that Christ is the only way to salvation and genuinely to
have asked God for salvation, and yet still to be unsaved.

Assurance and Election

This is the most we can say: God has promised certain things in Scripture.  Therefore if God is true to his Word, then what God has promised will happen.  At the end of the day we can never be 100% certain that God exists, or we would not have faith, we would simply know.

However we can be almost 100% certain that he does, and therefore almost 100% certain that we will be saved if we trust in his promises.

ESV Study Bible

Coming soon to a store near you... with over 25,000 notes, over 80,000 cross-references, and over 200 maps.  The layout looks brilliant.  Let's hope the anglicized edition looks as good!

ESV Study Bible

Changing posts to pages

I have just converted the post on the WordPress plugin Admin SSL into a page – it can now be accessed here.

It is very easy to do this – simply edit the `post_type` in `wp_posts` in your database from 'post' to 'page'.  Then you need to edit the new page and tell it to use the default template with comments, or all the comments will not display!

Finally, you need to setup a redirect from the old post URL to the new page.  I did this using a directive in .htaccess:

Redirect 301 /blog/2008/04... http://www.kerrins.co.uk/blog/admin-ssl

Not only does this redirect people browsing to the page, it also redirects feed requests.

Using svn:externals

After learning most of the basics of subversion, I discovered I had missed one of its most useful features: svn:externals.  This allows you to checkout multiple repositories into one location.  For a more detailed definition, go here.  To access the property, use your subversion program (look for an option called 'Show Properties' or something like that).  Or, if you can log into your server's shell:

$ svn propedit svn:externals ../some_dir/another/

This will open vim (or whatever text editor you have) to edit the property 'svn:externals' for the directory '../some_dir/another/'.  You don't have to be in the directory to edit its svn properties – simply specify the relative path to it at the end of the command.

The best way to think of svn:externals (and the other svn properties) is as an invisible file.  There is one for every directory in your repository.  This means that when you checkout a project, it also checks out the external variables into the folders you specify.  So, for example, I have all the code for my website in an SVN repository, and in the root web directory (public_html) I have this line in svn:externals:

blog    http://svn.automattic.com/wordpress/tags/2.5/

This checks out whatever files are in the repository at 'http://svn.automattic.com/wordpress/tags/2.5/' into the directory 'blog'.  This is basically it, but there is one more thing I didn't realise at first.  If you want to checkout a project into a directory, say public_html/blog/wp-content/themes/some_theme/, you don't have to add the command to the svn:externals property of the 'themes' directory.  Instead, you can do this, in the svn:externals of public_html:

blog/wp-content/themes/some_theme    http://some_repos/trunk/

You can have as many of these as you like.  I use them to checkout plugins for my blog – as you can see from this example file.  If you hadn't already discovered svn:externals, I hope you find it as useful as I do!