Having installed CentOS (wikipedia) on a server here, I was surprised to find that, by default, the source repositories were not enabled.
Below are the source repo definitions I use.  Simply create a file called “Centos-Source.repo” (# chmod 644) in /etc/yum.repos.d/ and enable repositories as required (using enabled=1).  Please note that this example is for CentOS version 5 and may differ from any official versions out there.  I offer no warranty… it just works for me.  ;-)

[base-SRPMS]
name=CentOS-$releasever – Base SRPMS
baseurl=http://mirror.centos.org/centos/$releasever/os/SRPMS/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1
enabled=1
updates
[update-SRPMS]
name=CentOS-$releasever – Updates SRPMS
baseurl=http://mirror.centos.org/centos/$releasever/updates/SRPMS/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1
enabled=1
used/produced in the build but not released
[addons-SRPMS]
name=CentOS-$releasever – Addons SRPMS
baseurl=http://mirror.centos.org/centos/$releasever/addons/SRPMS/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1
enabled=0
packages that may be useful
[extras-SRPMS]
name=CentOS-$releasever – Extras SRPMS
baseurl=http://mirror.centos.org/centos/$releasever/extras/SRPMS/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1
enabled=0
packages that extend functionality of existing packages
[centosplus-SRPMS]
name=CentOS-$releasever – Plus SRPMS
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/SRPMS/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1
– packages by Centos Users
[contrib-SRPMS]
name=CentOS-$releasever – Contrib SRPMS
baseurl=http://mirror.centos.org/centos/$releasever/contrib/SRPMS/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

News abounds today of Google’s statement, relating to its operations in China. The statement indicated that Google would consider exiting China completely if it could not operate, with government approval, in an unrestricted manner. The post is here: http://googleblog.blogspot.com/2010/01/new-approach-to-china.htmlIn business, to turn away just under 20% of your potential revenue to comply with your own principles must be a hard call to make. But Google is global, and perhaps 4.8 billion people in the rest of the world is a sufficient number to target with AdWords campaigns…

But what is really happening here? It’s difficult to believe that Google would invest so much time and effort, installing services in 2006, and then expect that within 4 years Beijing would accede to Google’s “wisdom” and suddenly allow freedom of speech. Within 4 years? After thousands of years of communist, dynastic and, occasionally, even tyrannical rule? No, somehow this seems unlikely.

It’s a surprising move by Google; one that could incite anything from a murmur of disquiet amongst the ranks of young Chinese teens, avidly seeking knowledge and understanding, to full-blown protests, perhaps even riots. It’s something of a political move, too: reading between the lines, it would appear that Google suspects Beijing of orchestrating the cyber-attacks on it and the twenty or so other organisations, as mentioned in their blog. By saying “play fair or don’t play at all”, Google may be vocalising the sentiments of the underclasses, still struggling to be heard from within the provinces.

Something that has not been mentioned (to my knowledge) so far in the press is the opportunity to expose Hong Kong. Under Chinese rule, but with special provisions (such as more liberal allowances on internet services), Hong Kong would present a potential new base for Google’s Chinese operation. But perhaps that’s a step too far?

The question remains whether it’s a viable exercise, and for viability, read “bottom-line”. Implementing the required censorship and publishing restrictions as required by the Chinese government will likely have been more technical trouble than they’re worth for Google, who elsewhere in the world have hands-down probably the most advanced information and revenue infrastructure to be found.

But information and revenue go hand in hand in Google’s business model. The less information, the less dynamism on-site, then the less interest there will likely be and the less uptake, over time. Google works in the west because there are virtually no limits, within the law, on trading ideas and services. In the far east, Google may have just observed a synergy that works to the detriment of its model. It may also be outgunned by larger powers at work; Beijing’s insurance.

We shall see if Google’s gambit, encouraging closer but more open ties with Beijing, will pay off.

Some time ago, mainly because my then-girlfriend bought me 3 Hacky Sacks (or ‘juggling balls‘, as they seem to be known these days), I took it upon myself to learn how to juggle.
An image of three juggling balls

The learning process is actually quite simple.  This is the method I have used:

  1. With two in one hand (e.g. left) and one in the other, throw up one (of the two) first and simply catch it with the other hand.
  2. Then, repeat but throw back from the right to the left.

    Completing just this first step is the key to learning how to juggle. 

    Continue to practice this method, tossing the sack from one to the other hand.  When you can always catch it, try the next step:

  3. When the ball is up in the air, throw the opposite ball up too.  The best time to throw it is just before the first ball reaches the parabolic peak (the top of the arc of travel).   Now that your second hand is free, catch the first ball.
  4. If you can, try to catch the second ball as well, using your first hand – just as you have already practised.

    Once you have got this far, you are well on the way to becoming an expert! 😉

  5. It goes without saying that, to improve, you need to throw the third ball into the air before catching either the first, or the second.

The paradox

This is the secret to success.  In order to successfully catch, time after time, you must successfully throw.  In other words, to hold on, you have to let go.

Perhaps it can be best summarised with a quote from Star Wars.  When Princess Leia is speaking to Governer Tarkin, shortly before he destroys the planet of Dantooine, she says (paraphrased), “the more you tighten your grip, the more will slip through your fingers”.

Today is Document Freedom Day. To celebrate, many of us open source netizens are doing the right thing and rejecting email attachments sent in proprietary formats, such as Microsoft Word, Excel and Access – 95, 97-2003 and so on.

The campaign is quite simple: refuse locked-in file formats.

The Free Software Foundation has provided some interesting examples of “polite” rejections to send to people who have emailed an attachment with a proprietary file format.

It’s a difficult thing, to tell someone that you are rejecting their attachment through choice.  You fear that it comes across as being awkward.  Breaking the social “norm” and standing for something you believe in is rarely painless.

There are ways to deal with this though, and the best way is probably humour.  It’s a serious message, yes, but that doesn’t mean it has to be all haughty overtones and morally correct principles shoved in people’s faces.  Making it funny will make it stick just as well.

Here are a few of my suggestions for handling your email rejections with a bit of added spice.  It’s a safe assumption that your friend uses Microsoft Office, so you could include this link at the end (http://www.sun.com/software/star/odf_plugin/get.jsp):

  • “Thanks for your email attachment.  Unfortunately, my dog ate it. He likes anything that is completely unpalatable, especially proprietary file formats.  He doesn’t seem bothered at all with open standards formats like the ODF, though.  Could you re-send your file using that format please? “

 

  • “Thanks for the document.  Sadly, we do not use proprietary file formats any more as the internet has brought about a revolution in open document format usage.  It happened so quickly that no-one noticed!! Please could you re-send your file in Open Document Format (ODF)?..”
  • “Thanks for the information. Regrettably, I am unable to open this format of document because I have become enlightened.  In my new karmic state, I only desire peace and harmony, and closed-off formats disrupt my inner sanctum.  Please could you re-send this file in natural, organic and eco-friendly Open Document Format?”

 

And of course, you MUST MUST MUST include a link to the Document Freedom Day web site, or to the Free Software Foundation, or to the Electronic Frontier Foundation, or to the Open Rights Group, or …

Links:

Thanks for watching!

In every day life, I come across a number of things that I find extremely useful.  Instead of clogging up my browser’s bookmarks, I’ll list there here for my reference.

I hope they might be of use to you too!

Programming

  • PHP
  • Flex
  • There is one thing I want from Org-mode more than anything: the ability to record the time I spend on various activities – even unplanned ones – and then see a summary of this time at the end of the week.

    Luckily, this is actually really simple.  I won’t go through the details of how to install or set-up Org-mode; that information is easy to read through at its rightful place.  Instead, it’s the key time-recording feature which I’ll briefly touch on here.

    How to start:

    1. Open up Emacs (not got Emacs? See the GNU web site or download it straight from the GNU FTP site)
    2. Start Org-mode by opening a .org file:

       C-x C-f  ~/org/work.org

    3. Start the clock on any item:

       C-c C-x C-i

    4. Leave it running for a minute or two and then stop the clock:

       C-c C-x C-o

    5. Now go into Agenda view:

       C-c a a

    6. When in Agenda view (commonly this opens in a second frame), just hit R:

       R

    Et voila! You should be able to see a summary of the time you have booked on your activities.

    Apple’s attempt to sell me an iPad
    (the image has now been deleted, but depicted Apple’s QuickTime-only web site with the plugin not working – or failing-over nicely, in my browser)

    So, I can’t quite work out why I might want or need an iPad. Amusingly, a friend of mine posted a link on Facebook to Apple’s “TV” adverts on its website.

    What I saw was the image, opposite.

    Hmm, strange. Is this product only for people who already use Windows and/or a Mac? Being unable to install QuickTime (which is for a “PC” or Mac only) means I am unable to view this product. Apple are unable to do the most basic thing with sales and actually demonstrate to me why this product is good.

    Which then led me to think, perhaps it isn’t.

    Hot off the press is v1.4.5 of Mark Hershberger’s weblogger, an extension to GNU Emacs / XEmacs which allows blogging from within the Emacs editor environment.

    Early indications are good – for me at least. I have found the process of setting up and using weblogger a bit tricky, at times, so it’s encouraging to see that I can at least add this blog entry fairly easily.

    Now, which is that “publish blog” keystroke…? 😉

    I love Linux.  Sure, it ain’t perfect; there’s still some things that could “feel” a bit more modern.  But at the same time, there is so much to its credit that it’s hard to ignore.

    Take, for instance, virtual memory.  All modern computers have it.  Mobile phones use it.  Basically any computer-oriented device probably used virtual memory paging instead of real address allocation.  It’s just more flexible and safer to leave all the memory management to the operating system kernel.

    The nice thing about the open source OS, however, is that you can determine just how “swappy” Linux is.  It’s a feature which allows incredible flexibility.

    For example, a recent filesystem and partition resizing operation that I undertook had the strange side-effect of rendering my swap partition strangely ineffective.  Being able to tune the swappiness of the kernel has allowed me to fix and test the problem in-situ.

    I’ve never been one for uploading my images in different places.  I don’t upload images to albums in Facebook or into Blogger itself.  Instead, I prefer to centralilse all my image storage at Flickr Picasa.

    The main reason for this is was that Flickr has been around a long time, is a veteran Yahoo web application, and has a great Javascript-based uploader which works flawlessly on Linux browsers – well, Firefox at least.  Unlike that stupid Java-applet attempt courtesy of Facebook’s programming team.  Sorry guys, “almost, but no cigar”.

    However, given that Yahoo charges for something that is an added detour from something else (Google+) that is essentially free, it no longer seems necessary to use it.

    So, when we see another wintry spell in the UK, perhaps I’ll take the aging Pentax *istDL out for another burn somewhere.

    Or maybe I’ll cling on to the Samsung Galaxy S (mk1) and the ease of Android 🙂