For pure server tasks there is probably no better free distribution than CentOS. What is then more natural than use it as a Mercurial server?
I will assume that CentOS 6.2 is already installed (at least minimal) and DHCP (if used) is already set up. Simplest test would be connecting via SSH. If you can connect, you are ready.
First step would be to install our web server. There is no doubt (ok, there is some) that Apache is way to go here.
yum install httpd
service httpd start
chkconfig httpd on
After installation we need to adjust firewall and test out setup by pointing our browser to whichever address our server has (in my case that would be 192.168.56.101). When you get Apache test page, you can continue further. Until that time, fiddle with settings.
There is already a Mercurial package included within CentOS repository but it is rather old version (1.4). We will go with newest and greatest. At time of writing that would be Mercurial 2.2.2.
Next we need to edit /srv/hg/cgi-bin/hgweb.cgi. Find line that has config parameter and replace value with “/srv/hg/cgi-bin/hgweb.config”. Then create /srv/hg/cgi-bin/hgweb.config and write:
Those settings will allow for HTTP-only operation where everybody (authorized) can push changes. For small networks this might be suitable, but you should probably be looking into at least enabling HTTPS. Guides for that can be found all around. You can find even (Ubuntu-specific) https guide on these pages so feel free to adjust and configure.
Last change will be to /etc/httpd/conf/httpd.conf. At the very bottom we will add following text:
Last setup step would be to adjust SELinux security a bit. Easiest way would be to disable it completely (check /etc/sysconfig/selinux). Proper way would be to just load module which allows actions that we need. While you can troubleshoot this yourself, I have also prepared pre-compiled SELinux module (only httpd-mercurial.pp is really needed, other file is for reference). After unpacking, just execute:
semodule -i httpd-mercurial.pp
And that is it. Now you will be able to access your repositories at 192.168.56.101 (replace IP with yours) and do with them as you please.
P.S. To create repository all you need is to:
cd /srv/hg/
hg init TestRepo
chown-R apache:apache TestRepo
As I was checking search for my website I noticed that Google would return essentially same page multiple times in search results. One result pointed to post, second one pointed to same post but within categories and third would be same again but in archives. Not what you can call great search experience.
On WordPress platform (that is used here) solution is really simple. All pages that I don’t want shown I can block from Google via robots meta attribute with content “noindex,follow”. Simplest way to do this is to directly edit header.php file and, below
If page is singular in nature (e.g. post, page, attachment…) nothing will happen. If page is collection, one simple html attribute is written.
While this is simplest solution, it is not upgrade-friendly. For each new WordPress version, same change will be needed. Better solution would be to pack this into plugin so each new version can continue using it without any change. Creating plugin in WordPress is as easy as filling some data in comment (e.g. plugin name, author and similar stuff) and then attaching to desired action. In our case full code (excluding plumbing) would be:
Whole plugin can be downloaded here. Just unpack it into wp-content/plugins directory and it will become available from WordPress’ administration interface.
Most noticeable change for this release will be new icon. Not a huge change, but a colorful one. Considering that last icon was gray-scale, I see it as a good change.
Other visible change would be New disk dialog. It is changed a bit in order to allow for more flexible size entry. Finally you can create 0.1337 GB hard drive that you always wanted.
Under the hood there were many changes. While some were bug-fixes, most of them were focused on drive management. This will finally give possibility of drive letter change in next version (currently being tested).
Download is available from within application or via program pages.
P.S. If someone is interested in checking drive letter management beta all you need to do is to send me a mail.
For those counting, that means end-of-life earliest at year 2022. Since it was created in year 1998 that gives an impressive 24 years of support. Name me one language that had longer support for single version. Yes, Marc, I know of Visual C++. Name me some other. :)
First program I ever sold (and quite a few afterward) was written in this beautiful language. It was not powerful. It was not fast. It was not even sensible at times. But it got job done and that is what counts.
While I am happy with my current choice of C# I cannot but smile at simpler times and language that marked them. May it live forever (or until Windows 9, whichever comes first).
First thing that you will notice when starting Visual Studio 2012 RC is that things got slower. It is not as bad as Eclipse but it is definitely not as speedy as Visual Studio 2010. Second thing you will notice is SCREAMING CAPITAL LETTERS in menu. This change was done in desire to Metro style everything and increase visibility. I can confirm success since it sticks out like a sore thumb.
Fortunately, once you get into editor, everything gets better. There are no major changes for users for old Visual Studio but evolution steps are visible. Find/Replace got major overhaul. Coloring is improved a bit. Pinning files is nice touch. That sums most of it. It was best editor and it remained as such.
Solution window now shows preview when you go through your files so just browsing around saves you a click or two. Beneath each item there is small class explorer. While this might works for small project, I have doubts that it will be usable on anything larger. But I give it a green light since it stays out of your way.
Beautiful change is that every new project automaticaly gets compiled for Any CPU. This is more than welcome change especialy considering utter stupidity from Visual Studio 2010. I just hope that Microsoft keeps it this way. Whoever is incapable of 64-bit programming these days should probably stick to COBOL.
Speaking of utter stupidities, there were rumors that Express editions will not support proper application development but only Metro subset. While I am not against Metro as such, I consider decision to remove Windows application development as good as Windows Phone is. Or, in other words, it might seem logical in head of some manager but in real life there is no chance of this working.
I see Visual Studio Express as a gateway drug toward other, more powerful, editions. Crippling it will just lead to folks staying on perfectly good Visual Studio 2010. Not everybody will have Windows 8 nor care about them. Since I schedule posts few days/weeks in advance, original post had continued rant here. However, there are still some smart guys in Microsoft so desktop application development is still with us in Express.
If I read things correctly it gets even better. It seems that unit testing and source control is now part of Express edition. That were the only two things missing! Now I am all wired up for Express to come. Judging from experience I should probably tone it down unless Microsoft management decides to take some/all stuff away.
All things considered, I am happy with this edition. It is stable, it has no major issues and it is completely compatible with Visual Studio 2010. For most time it feels like Visual Studio 2010 SP2. Try it out.