post

True but I doubt we will ever run out of things to tweet about.
Tweets will out run Blog Posts

User Level: Intermediate

This article assumes that you already have the following installed and working:-
* Linux
* Subversion (SVN)
* A SVN Repository
* GCC (To compile your C scripts)
* Vi (or another text editor)

You will also need shell access to your server to perform the following functions, either you are directly on the machine or you are using a utility like Putty to access your server.

The idea of this post is to allow you to automatically update your files in a public html directory after you commit to your SVN repository, you may want to create a subdomain like preview.domain-name.com or sandbox.domain-name.com. You may deploy a particular folder from your svn repository or the complete repository.

 
   $ svn checkout /full/path/to/your/svn/db
      /full/path/to/your/public/html/directory
 

To begin this process, login to your server and checkout the SVN repository (svn checkout) to your public html directory, some servers the public html directory will be "/var/www/html", "/var/www/public_html" or "/var/www/vhosts/domain-name.com/httpdocs". There are many different configurations so check where your public html directory is, you may also create a directory under your public html directory to check out the SVN directory to. You will need to remember the directory to which you have checked out your SVN database to for later. This article does assume you already have a SVN database set-up and working.

 
   $ cd /full/svn/path/hooks
 

Change directory (cd) to your SVN database hooks sub-folder.

 
   $ cp post-commit.tmpl post-commit
 

Copy (cp) the template file "post-commit.tmpl" to "post-commit" (without the quotation marks).

 
   $ chmod +x post-commit
 

Change file system mode (chmod) of the "post-commit" file to execute (-x).

 
   $ vi svnupdate.c
 

We need to write a little C program that will do the work. The command above will open up the vi editor to create the "svnupdate.c" file, you may use any text editor of your choice.

 
   #include <stddef .h>
   #include <stdlib .h>
   #include <unistd .h>
 
   int main(void)
   {
      system("svn update
         /full/path/to/your/public/html/svn/directory");
   }
</unistd></stdlib></stddef>

The above script will execute the command to update the SVN repository in the public html directory we created earlier.

 
   $ gcc -o svnupdate svnupdate.c
 

We need to compile our little C program with GCC. The above command will compile our "svnupdate.c" file and output our little program "svnupdate".

 
   $ env - ./svnupdate
 

Lets test our little program, your SVN repository should update with the latest changes. If you receive any errors here then you either a) haven't specified the correct directory in the "svnupdate.c" script or b) you didn't checkout the SVN database properly. If you receive any errors, go back and fix them, there is no use continuing on from here.

 
   $ chown root:root svnupdate
 

Change the owner (chown) of our compiled C program to root.

 
   $ chmod +s svnupdate
 

Change the mode (chmod) of the "svnupdate" file.

 
   $ vi post-commit
 

Now we need to edit our "post-commit" file to execute our "svnupdate" file.

 
   /full/file/path/to/the/file/svnupdate
 

Add the above line to the "post-commit" file and save the file.

Now when you commit files from your SVN directory, the server will update the SVN repository in your public html folder. To protect your files, you may want to protect the public html directory with a login using a .htaccess file.

I'm happy for any suggestions or any corrections, so please don't forget to leave a comment below.

Twitter Logo

I haven't really given a plug to Twitter before and I believe this service is a one of a kind.

What is twitter?
Twitter is a free social networking and micro-blogging service that allows users to send "updates" (or "tweets"; text-based posts, up to 140 characters long) to the Twitter website, via short message service (e.g. on a cell phone), instant messaging, or a third-party application such as Twitterrific or Facebook.

Updates are displayed on the user's profile page and instantly delivered to other users who have signed up to receive them. The sender can restrict delivery to those in his or her circle of friends (delivery to everyone is the default). Users can receive updates via the Twitter website, instant messaging, SMS, RSS, email or through an application.

How I benefit?
Only just yesterday I solved a query of mine by posting a message out to all my followers about whether they recognize a font a client needs that they have used before in their branding. About an hour later I had my query answered.

This has happened many times before where I've had the most complex question answered by someone who is well experienced in the area. But before you can get people to answer these questions you must have a connection with them (ie: they have to follow you).

Your messages 'can' appear on the public timeline but the chances of someone picking up on your message is very unlikely. So jump onto Twitter and follow people you're interested in, reply to their messages and before you know it you'll have some connections.

Message to twitter: "We'd like to thank you in 140 characters or less. And we just did!"

Don't forget to follow me!

Links:-
* Twitter
* Twitter Blog
* My Twitter Account

Donkey Gamer Logo

Every person must admit they love to play a game here or there, especially these days with the amount of interaction game play has (internet, tilt sensing controllers). Donkey Gamer are independent people from Australia and UK who simply like to talk, write and play games.

About Donkey Gamer from their website

We are a bunch of people from Australia and the UK that love gaming, but are sick of the typical news stories; they are good don't get us wrong, but fail in pointing out the lighter side and the memories associated with gaming. While we often take the piss out of anything we can in games, we realise that a big chunk of our childhood memories are older games, and now that we are "old" we can also see another side.

It started as an idea to highlight areas of gaming that made us go "wtf!?". For example, why are there watermelons in a missile silo? Originally the project was called "Gamedero" but so not to limit us to just an Aussie audience, it was decided that Donkeygamer would be a more appropriate name.

The team is diverse, both in tastes and writing styles, which works well to bring a new level of satire to gaming websites. We hope to prove that 'non-gaming' aspects of gaming can also be worth talking about.

I've found out a fair bit of gaming info from this site, on one occasion I found out a bit too late (had already brought the game), so I hope you all enjoy what these guys have to offer. In the mean time I'm going to play a bit of Guitar Hero III with my fiance and mate Thuan.

Full Mail Box

Hi all, if you're wondering why I haven't posted an article for exactly 1 month now, it is because I've been extremely flat out and a lot has happened since then that has kept me away from writing a post on my blog. A lot of new technologies have emerged recently especially in regards to web technologies and the web industry in general.

I'll be making more posts more frequent now that things have settled down (a bit).