Fedora 15, first touch

Just upgraded to Fedora 15. Can’t say much yet, but just a bit:

Upgrade process

After preupgrade downloaded all the packages and asked for the reboot, Anaconda didn’t start correctly and I had to do hard-reset, which booted back Fedora 14. Run preupgrade again, it checked for all packages to be downloaded. After second try of rebooting from preupgrade everything went fine

YUM update stuff

Running yum update from Fedora 15 gave me some troubles with duplated packages. Fixed that by running

yum update | grep duplicate | cut -d ' ' -f 6 > duplicates.txt
yum remove `cat duplicates.txt`

Note that you should review what is being deleted, not to erase something that should stay. I had to exclude few rpms from the duplicates.txt file

Some repos also didn’t work for F15, so I had to disable them for a time being…

Gnome 3

Looks fancy and nice, but need to get used to it. Need to find a way to customize things around

System Services

As Fedora switched to new system services startup system, chkconfig and other tools I am so used to do not work fully now, instead there is a systemctl thingy which I need to look into more deeply

Will post some more later on as I will be finding things…

Dropbox and major cleanup

I’ve been hearing about DropBox for a while now, but somehow never checked it out until few days ago. The service is really nice, easy to use and pretty handy. While starting to use it, I was moving a lot of my staff under the directory which is being synced with the server and decided to clear up the mess around my home directory, which was gathering there for a long while.

It all went into major clean up. Deleted old and obsolete documents, all media content (movies from mobile camera, pics and so on) which is already uploaded to one of those services like Flickr or YouTube. Deleted everything that I haven’t touched for few years and won’t probably need any more as well as content which is freely available on the internet and can be redownloaded easily.

After all of this, I went to all my IM lists and cleaned old contacts, removed all obsolete passwords from my password managers (use KeepAssX for this). Finally – went through few of my servers and removed old websites that were not used for ages and there is no need for them any more.

Now I feel better and I am waiting for release of Fedora 15 today…

P.S.: DropBox is running an offer where if I invite someone there, both of us will get +250MB of storage, so if you are not using DropBox and you are thinking to try it – let me know, so I can send you an invite (instead you directly registering) and we can all benefit ;-)

Update: thanks to Chris Ergatides for pointing out the direct referring link on DropBox, so if you want to register there, referring to my name, click this link (thanks in advance) ))

Wind Power Generators near Paphos

It’s been a while since I did some trips around the island, but looks like I will start this habit of going around on weekends again.

To start with, I went to wind power generators near Paphos this Saturday. Photos are here. For those who don’t know how to get there – it is pretty easy. I was driving the old road to Paphos from Limassol and after I passed Aphrodite hills, there is a turn to the small village called Kouklia, few kilometers before Paphos. The road number is F612 (shown on the traffic sign as well as all the maps). As I was going this road, the power generator mills are seen all over and I just took the first convenient turn off the road to reach what I was looking for. Actually, those things are all over at that region, so it is not that hard to navigate to them. They are just awesome and huge.

Another thing I’ve noticed since the last time I’ve been there is a specific noise that comes from work of the mills. Last time I saw them, they were off and silent. This time it was even more impressive.

BTW, since Yana has a proper Olympus camera, the photos should be bit better, compared to the ones made by my mobile phone :) Though I am not a photographer or anything of that sort, the difference still should be seen.

C++ examples

Though I am not coding in C++ and my experience in these languages is minor, I am ofter asked to help students with the studies in the subject. So was the case recently, so I ended up writing two small programs: one has to do with link lists and few functions to work with them like push, pop, insert, remove, sort, print, search and the other one is a classic thing with drawing triangular from star (or any other) symbol.

Just in case someone is learning C++ now, you can download the code and go through, hope it will help or give an idea.

So here is the link_list.cpp stuff and here is a star.cpp.

BTW, those who are using Windows and something like DevC++ often can see a call to system(‘PAUSE’) which is really bad and works only on Windows. While doing link list thing, I did a function called user_wait(), which does the same, but  in more natural way, here it is:

  /* waits for user to press Enter. Good replacement for system('PAUSE') which works only on Windows */
  void user_wait ()  {
      char blah;

      std::cout << std::endl << "... Press Enter to Continue ..." << std::endl; // print msg
      std::cin.get(blah); // wait for Enter
      std::cout << std::endl; // put newline
  }

CakePHP related

It’s been ages to post here (as usual), so I just thought of putting couple of things about CakePHP and stuff related.

First of all, if you are developing under windows, and the production server is running Linux, keep in mind that Linux file system is case-sensitive. So if you create an image linked to logo.jpg, while the file will be logo.JPG – it won’t work. CakePHP tries to locate file on filesystem and it will look only for logo.jpg and fail in case you put logo.JPG.

Second, if you need to have direct access to MySQL to run some queries using native PHP mysql_query methods, but you don’t want to specify DB settings twice, you can always extract current connection from CakePHP models as follows (assuming you are using some model called ‘User’ and it is available in the current class):

$dataSource = $this->User->getDataSource();
$db = $dataSource->connection;
$result = mysql_query("SELECT .... WHERE .... LIMIT 10,20",$db);

I use this when I need to work with huge tables to run some CakePHP shell scripts faster :)