Posts Tagged ‘download’

How to enable output compression (gzipfile content compression) in nginx webserver

Friday, April 8th, 2011

I have recently installed and configured a Debian Linux server with nginx
. Since then I’ve been testing around different ways to optimize the nginx performance.

In my nginx quest, one of the most crucial settings which dramatically improved the end client performance was enabling the so called output compression which in Apache based servers is also known as content gzip compression .
In Apache webservers the content gzip compression is provided by a server module called mod_deflate .

The output compression nginx settings saves a lot of bandwidth and though it adds up a bit more load to the server, the plain text files like html, xml, js and css’s download time reduces drasticly as they’re streamed to the browser in gzip compressed format.
This little improvement in download speed also does impact the overall end user browser experience and therefore improves the browsing speed experience with websites.

If you have already had experience nginx you already know it is a bit fastidious and you have to be very careful with it’s configuration, however thanksfully enabling the gzip compression was actually rather easier than I thought.

Here is what I added in my nginx config to enable output compression:

## Compression
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 9;
gzip_http_version 1.1;
gzip_min_length 0;
gzip_vary on;

Important note here is that need to add this code in the nginx configuration block starting with:

http {
....
## Compression
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 9;
gzip_http_version 1.1;
gzip_min_length 0;
gzip_vary on;

In order to load the gzip output compression as a next step you need to restart the nginx server, either by it’s init script if you use one or by killing the old nginx server instances and starting up the nginx server binary again:
I personally use an init script, so restarting nginx for me is done via the cmd:

debian:~# /etc/init.d/nginx restart
Restarting nginx: nginx.

Now to test if the output gzip compression is enabled for nginx, you can simply use telnet

hipo@linux:~$ telnet your-nginx-webserver-domain.com 80
Escape character is '^]'.

After the Escape character is set ‘^]’ appears on your screen type in the blank space:

HEAD / HTTP/1.0

and press enter twice.
The output which should follow should look like:


HTTP/1.1 200 OK
Server: nginx
Date: Fri, 08 Apr 2011 12:04:43 GMT
Content-Type: text/html
Content-Length: 13
Last-Modified: Tue, 22 Mar 2011 15:04:26 GMT
Connection: close
Vary: Accept-Encoding
Expires: Fri, 15 Apr 2011 12:04:43 GMT
Cache-Control: max-age=604800
Accept-Ranges: bytes

The whole transaction with telnet command issued and the nginx webserver output should look like so:

hipo@linux:~$ telnet your-nginx-webserver-domain.com 80
Trying xxx.xxx.xxx.xxx...
Connected to your-nginx-webserver-domain.com
.Escape character is '^]'.
HEAD / HTTP/1.0

HTTP/1.1 200 OK
Server: nginx
Date: Fri, 08 Apr 2011 12:04:43 GMT
Content-Type: text/html
Content-Length: 13
Last-Modified: Tue, 22 Mar 2011 15:04:26 GMT
Connection: close
Vary: Accept-Encoding
Expires: Fri, 15 Apr 2011 12:04:43 GMT
Cache-Control: max-age=604800
Accept-Ranges: bytes

The important message in the returned output which confirms your nginx output compression is properly configured is:

Vary: Accept-Encoding

If this message is returned by your nginx server, this means your nginx now will distribute it’s content to it’s clients in compressed format and apart from the browsing boost a lot of server and client bandwitdth will be saved.

Substitute for Putty SSH client on Nokia 9300i

Sunday, May 30th, 2010

I’ve recently had issues with my Putty for S80 on my Nokia 9300i.
Though the port of Putty for Symbian is quite good looking it has many down falls. A major down side is it’s slowness, a connectionto an SSH server would take up like 5 to 7 minutes time.
As they say time and money and loosing time is annoyance and this is especially true if you have to quickly do something on a server via your mobile.

I looked online for good SSH clients that might be a substitute to the PuTTY SSH client In my search I came across this list of SSH clients compatible with the Symbian’s S80 phone architecture

Mocha Telnet client for Nokia 9300, 9300i and Nokia 9500

I haven’t tested all of the provided clients but I was blessed to find what I was looking for, I found the Mocha Telnet for Nokia 9300/9500 which is a really nice SSH and Telnet client. I had to acknowledge, it’s interface and it’s SSH session management interface is a way down uhandy but in general the Mocha Telnet is a quickly connection handler able to communicate with the remote SSH servers on Nokia 9300i.
Usually to establish an SSH connection to a server it tooks like 1 minute using the Mocha Telnet this is really quick compared to the 6 minutes waiting while using PuTTY.

Here is a list of the capabilities of the Mocha Telnet client for Nokia 9300 / 9500 (a quote from Mocha telnet’s website):

Mocha Telnet Features:

* VT220 emulation.
* SSH2
* Autologin with scripting parameter.
* User defined function keys.
* Screen mode 24*80.
* Online Help.
* Many trim parameters.
* Small and fast.
* Free upgrades to new versions of the product.

To download the Mocha Telnet SSH for your Nokia 9300i check here

The Mocha Telnet creators Mocha Sof provides also a nice vnc client for Nokia 9300i you can download the program from here

But wait there is even some more glad glad tidings about Mocha Telnet and the Vnc. It seems since the programs product cycle is over and there are no new versions of the programs developed for the Nokia 9300i and a few other old school Symbian powered Nokia phones, MochaSoft decided to liberate the applications as a freeware by providing a freeware registration codes for the programs to benefit from the codes and register both your Mocha Telnet you can use:

Freeware license key for mocha Telnet for Nokia 9300,9300i/9500:

License name: freeware
License key: A15761

The Freeware license key for mocha VNC for Nokia 9300,9300i/9500 is:

License name: freeware
License key: 142449

In case if you’re curious, how administration of a remote Windows server will look alike over a VNC client, here is also a nice screenshot of Mocha VNC for the Nokia 9300i mobile:
Mocha Vnc Nokia 9300, 9300i, 9500
There are a few other interesting applications for other mobile phones again by MochaSoft, check them here

Installing EEMame to play MAME games on Nokia 9300i / Turn your Nokia mobile to arcade game statition

Monday, May 31st, 2010

EEMame Nokia 9300i

Since I’m keen on old school arcade games I checked online if I can install and play MAME (Multimedia Arcade Machine Emulator) games (roms) to my Nokia 9300i mobile.
The information on the topic on the Net is pretty much muddled so it took me a while until I found that in order to install a MAME port for Nokia 9300i I will have to use EEMame – MAME for Symbian Mobile Phones .
The first thing I came across before I finally found EEMame was EMame 9210 .
Emame is a port of Mame that is compatible with Nokia 9300i since the 9300i mobile has backward compatibility with the older 9210 phone.
To save memory since the Nokia 9210 has low memory capacity the Mame 9210 application is actually separated in 4 applications each of which containing a set of drivers for a number of mame rom game files.:
The whole application Emame9210All.sis is separated into the following parts:

EMame9210Set1.sis
EMame9210Set2.sisEMame9210Set3.sis
EMame9210Set4.sis

For convenience the developers has provided also a .sis file containing all the up-mentioned 4 parts in one .sis archive
For some convenience I have created a mirror from which you can download EMame9210All.SIS

Though the Emame9210 would install on the Nokia 9300i and you’ll be able to run each of the 4 exe files from the Nokia file manager I couldn’t make the application work with any of the listed roms that are marked as a tested on the Emame9210.
Honestly I didn’t really spend much time trying, so it could be my fault that I couldn’t bring the Emame9210 on my 9300i mobile. Be aware that trying to run some rom files downloaded from romnation.net and listed as compatible with the 9210 arcade emulator led the Emame9210 programs to crash.
So assume the Emame9210 is not really compatible with the Nokia 9300 phone. Anyways this first time though mournful was just a plunge-board to the “real deal”, e.g. the real joy experienced when I found out that the EEMame port is available for Nokia 9300i
To install the EEMame on my Nokia 9300i I downloaded and installed the eemame-series80-1.1.SIS . The file is also available through EEmame’s official website download section along with few other EEmame for a few other Motorolla and Nokia powered devices.

Another thing I really liked about EEMame is that it’s released under the GNU General Public License

So far so good ’till now I was having a complete working version of MAME to my Nokia 9300i mobile but I was lacking any games and I was absolutely lazy to scrape through the internet to find some working rom files for the EEMame, not to mention that only a exact set of rom files is compatible to the device and you have to check and download the compatible games one by one … this is pretty much insane especially if you’re a busy man as I am.
I assumed somebody has already done the hard task of downloading and creating a pack with rom files that run on the EEMame so I spend approximately some half an hour to look for a preliminary prepared pack of rom files that would run on the EEMame mobile (Multiple Arcade Machine Emulator).
The original announce for the availability for download of eemame 218 rom games which are compatible with EEMame could be red here

You can download MAME_S60v3_and_working_ROMSET_by_herbalb.rar here

Herein I will include herbalb original message found along with his 218 rom games pack for EEMAME :

Some time ago I made a romset that includes 1320 of 1321 Roms known to work with EEMAME (also included). Hope some of you will like it and have fun playing these original arcade games (i.e. Wonderboy, Ghost N Goblins, Joust, Arkanoid, 1943, Burger Time, Contra ...).
By the way, when starting a game and you read 'press OK to continue' just push left and then right on the directional pad on your phone and the game will start.

I tested them (many of them) on my N95.
You can also try this version of EEMame to use with the Set above (I have not tested this version as i am using the one includet in the set)Happy new year and peace to everyone.

herbalb

NOTE: I am happy if you share it with others but please do not say it would be your own work. It took me hours to do find all necessary games for this set, so please be social, thanks.

As you can see in herbalb’s message the ROM games for EEMame are not tested with other mobile phones except the N95.
I downloaded and tested his EEMAME rom pack set and I have to confirm almost all the game are loading with EEMame perfectly fine.
However there is two minor down-sides of the EEMame on Nokia 9300i. First you will probably have to play the rom games without a sound, because when sound is enabled almost all the games will work slow as hell, and second most of the MAME emulated games will occupy just a small portion of your screen and you won’t be able to enjoy the joy of playing the game on a full wide screen on your cellphone.
Anyways life is not perfectly anywhere, being able to play all this wonderful oldschool arcade directly on your Nokia 9300i mobile turns your mobile into a sophisticated game station and guarantees you a lot of fun.
I have prepared a list of all the rom files included with MAME_S60v3_and_working_ROMSET_by_herbalb.rar, you can check the whole list of roms available for EEMame on Nokia 9300i here

I have also made some few modifications in the readme of the herbalb’s archive and have included the necessery sis file to install and run EEMAME on Nokia 9300i the new archive can be downloaded here.

Just in case if you need to download some specific rom files from the whole collection please select your preferred EEMame ROM file here
Well, That’s all folks! All left now is to truly enjoy your classic nitendo & arcade games playable directly on your Nokia 9300i mobile! 🙂

How to pass ITIL preparation – Dumps, PC and Mobile Android software to prepare

Wednesday, April 30th, 2014

ITIL-service-design-serice-operations-service-transition
I'm just coming from my ITIL (Information Technology Infrastructure Library) Foundations Exam. ITIL Certification is mandatory for all HP employees and everybody in my team already passed it. Thanks God I passed the ITIL as well with 87.5%.

To prepare for the exam I used Dump files (files with questions and answers given to people on previous exams) and software that simulates testing Avanset Visual CertExam Manager on PC as well as VCE Exam Simulator for Mobile.

VCE Exam Simulator is a test engine designed specifically for certification exam preparation. It allows you to create, edit, and take practice tests in an environment very similar to an actual exam.

ITIL exam was held here in Sofia in Technologica EAD Study Center. ITIL exam is kindly paid by HP and costs $250. ITIL Foundation is first level of certification next one is ITIL intermediate.

In order to prepare for ITIL it took me about half a day reading the ITIL Dump files (you can download them here) and 2 days of actively simulating the exams mainly with VCE EXam Simulator on my Android based mobile.
For those who want to become ITIL professionals and are going to certify further in ITIL Intermediate I recommend check all the ITIL Books covering the ITIL v.3 exam (here).

If you have the time and you want to have in depth understanding on ITIL also download and watch this ITIL Exam preparation Videos.

Here are also ITIL Foundation v.3 Dumps for Visual Cert exam manager. By the way ITIL exam is nowadays is required for almost anyone employeed in middle or large sized IT companies so if you still don't know anything about it and you're working or you will be working in the IT field take a look at. Lastly when I was looking for job offers I've noticed there are already plenty of companies who either require the candidate to have an ITIL passed or count ITIL certified candidates advantageous.

Windows XP / 7, Minimize any program to system tray free software – RBTray, Trayconizer and Windows HideIT

Monday, January 5th, 2015

rbtray-screenshot1-on-ms-windows-minimize-any-application-systray-winblows
As Linux admin, I'm already aware of AllTray *NIX application able to send any application to GNOME / KDE tray.
But what If you have a program on Windows XP / 7 / 8,  that doesn't have a minimize to tray functionality and you want to send it to tray?
I.e. what if you want to send programs like Notepad (that doesn't by default go to win systray) to Windows  tray in order to prevent them mess up with other Open Windows minimized windows?

After a quick research on the topic I found these 3 – RBtray, Trayconizer, HideIt, Below is a very quick review on each

.

1. Minimize any Windows program to tray with RBTray

rbtray_windows-7-screenshot-minimize-any-application-to-tray-minimize-notepad
If you want to stick to open source (GPL) software a tiny free software proggie that does the trick is RBTray current latest RBtray is 4.3 release is download mirror is here.

To use RBTray you don't need to do anything, once program is unarchived from archive, once launched there will be no system application that it is running, but you can go to any minimized program (not in tray) and by clicking with right mouse button on minimize button you will the app minimize to tray.

Here is how RBTray works (taken from archive README file):

Installing:
Extract the 32-bit or 64-bit binaries (depending on your OS) to a
 folder, e.g.
C:Program FilesRBTray.  Double click RBTray.exe to start it.  If you want it
to automatically start after you reboot, create a shortcut to RBTray.exe in
your Start menu's Startup group.

Using:
Right click on any program's minimize button to minimize it to the tray.  To
restore, single-click the program's icon in the tray.

Exiting:
Right click on any tray icon created by RBTray and click Exit RBTray in the
popup menu.  Or run RBTray.exe with the –exit parameter.


2. Miminize any app to system tray with Trayconizer

trayconizer_screenshot-microsoft-windows-minimize-notepad
Trayconizer is the other tray minizer tool you might want to check out, Windows tray minize application a download mirror of Trayconizer is here. As of time of writing this post (current) latest Trayconizer version is 1.1.1.

Trayconizer allows you to minimize virtually any application to the system tray rather than having it take up valuable space in your taskbar. The screen shot to the left shows Trayconizer minimizing Notepad to the system tray. Trayconizer is definitely the tool of choice of system administrators who need to keep minimized windows program to system tray each time on boot as it can be easily run from command line.

Using Trayconizer is simple. To start Trayconizer on Notepad, you would execute: C:PathToTrayconizer.exe C:WindowsNotepad.exe.

You can create a shortcut in your Startup group to execute Trayconizer on a program that you use frequently but want to keep tucked out of the way in the system tray when you're not using it. There is even an option for starting the application initially in the minimized state.

Trayconizer will automatically shut itself down when you close the program you are Trayconizing. Additionally, multiple Trayconized programs are handled by a single instance of Trayconizer to avoid wasting system resources.

Trayconizer requires no DLL's beyond the base Win32 API libraries and will not store any entries in your registry.

3. Minimize any program to Windows systray with Windows HideIT

windows-hideit-minimize-to-tray-screenshot-send-any-running-windows-program-to-systray

Another good tool useful in hiding (minimizing) Windows programs which are lacking the minimize option embedded built-in is Windows HideIT.

Hideit official download website is here, note that with Hideit, Its pretty confusing to find where to download in (so to download look in the right upper corner for a download button) HideIT Download Mirror is here.

Hideit should be able to minimize any Application to sysytem tray, while Rbtray fails ith some. Both RBtray and Windows
HIdeIT will popup with a blue down-arrow on Tray icon once launched and you can show / hide minimized applications from there.

All RbTray, Trayconizer and HideIt tray minimizers should work on virtually all NT 4.0 Windows XP / 2000 / Vista / 7 / 8 though I haven't tested on all of 'em yet. If you happen to find it working on  Win NT 4.0 / 8 etc., please drop a comment.

Convert png files to ico on Linux – Create “icon” files from pictures

Tuesday, November 2nd, 2010

You will need png2ico

First you will have to download the png2ico source

Now you will have to download compile and install the program by issuing:

debian:~# wget http://www.winterdrache.de/freeware/png2ico/data/png2ico-src-2002-12-08.tar.gz
debian:~# tar -zxvf png2ico-src-2002-12-08.tar.gz...
debian:~# cd png2ico/
debian:/root/png2ico# make
debian:/root/png2ico# cp -rpf png2ico /usr/local/bin/

Convertion is pretty easy and it comes to executing simply:

debian:/home/hipo$ png2ico favicon.ico png_picture_to_convert.png

Note that your png_picture_to_convert.png has to be in a graphic dimensions of 16×16
That’s all now you should have your favicon.ico on your Linux created.

Downloading your favourity flash video from Youtube with a simple command (youtube-dl)

Wednesday, April 13th, 2011

downloading-flash-videos-from-youtube-on-linux-and-bsd-youtube-downloader-logo
Watching videos in youtube today and already for about 2 years is the de-facto hype.
There is almost none a day passed without almost each one of us has watched a dozen videos in Youtube.

Watching videos in youtube has become even more addictive for many than the early days of Internet Relay Chats (IRC)

As youtube is very accessible for people and it’s a comparativily easy way people share more and more with the day.
There is no question that the business idea of youtube is great and youtube generates millions of dollars for Google day by day, however I have a serious objection here! All is good the only pitfall is that you don’t own the youtube videos you watch!

Youtube’s story is not that different from the story of the cloud computing threat to internet users Freedom

The good thing here is that we’re not still completely dependant on youtube and there is still way to retrieve your favourite youtube video and store it for later watching or distribution.

Probably the most famous browser plugin that allows files retrieval from youtube, as most people know is DownloadHelper .

However using download helper is browser dependant, you need to use the browser to save the plugin and I don’t find it to be the best way to download a youtube video.

Since the old days I have started using Linux, I’ve been quite addicted to as many things on my linux as possible from the command line (terminal / console) (CLI) .

In that manner of thoughts it was a real delight for me to find out that a group of free software developer guys has come up with a command line tool that allows downloads of youtube videos straight from terminal, the great software is called youtube-dl and at the moment of this post writting it’s to be found on the URL address:

http://rg3.github.com/youtube-dl/

Youtube-dl is written in python so, it requires the Python interpreter, version 2.5 in order to properly run on Unix, Mac OS X or even on Windows!

The fact that it’s written in python has made the little shiny tool quite a multi-platform one.
To start using immediately the tool on a Debian or Ubuntu Linux you will have to install python (even though in most cases you must have it already installed):

1. To make sure you have python interpreter installed issue the cmd:

debian:~# apt-get install python
Building dependency tree
Reading state information... Done
python is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

As you can see from above apt-get’s output I do have it installed so nothing gets installed.

2. As a next step I used links to download the youtube-dl python script, like so:

debian:~# links https://github.com/rg3/youtube-dl/raw/2011.03.29/youtube-dl >> youtube-dl
Use the links interface to save youtube-dl and use gzip to ungzip it
debian:~# gzip -d youtube-dl.gz
debian:~# chmod +x youtube-dl

Now to make it system wide accessible I have copied the youtube-dl to /usr/local/bin , whether I selected /usr/local/bin as a location as this location is predetermined to contain mostly files which does not belong to a regular deb package.

3. Move youtube-dl to /usr/local/bin

debian:~# mv youtube-dl /usr/local/bin

4. Test the newly installed youtube-dl command line youtube retrieval tool:

debian:~# ./youtube-dl https://www.youtube.com/watch?v=g7tvI6JCXD0
[youtube] Setting language
[youtube] g7tvI6JCXD0: Downloading video webpage
[youtube] g7tvI6JCXD0: Downloading video info webpage
[youtube] g7tvI6JCXD0: Extracting video information
[download] Destination: g7tvI6JCXD0.flv
[download] 53.3% of 22.62M at 33.23k/s ETA 05:25
[download] 100.0% of 22.62M at 31.91k/s ETA 00:00 [u

As you might have noticed from the above youtube-dl command output the newly retrieved youtube file will be saved under a name g7tvI6JCXD0.flv

The line I passed to youtube-dl is directly taken from my browser and pasted to console, the file downloading from youtube took me about 10 minutes but this is mostly because of some kind of youtube server speed restrictions …

In general at least I have this video for later, watching, so after a while I can watch it once again without loosing a lot of time trying to remember what was the video headline name

5. To use youtube-dl in a bit advanced way you can for instance invoke the command with options like:

debian:~# ./youtube-dl -l -w -c https://www.youtube.com/watch?v=g7tvI6JCXD0
[youtube] Setting language
[youtube] g7tvI6JCXD0: Downloading video webpage
[youtube] g7tvI6JCXD0: Downloading video info webpage
[youtube] g7tvI6JCXD0: Extracting video information
[download] Destination: BSD is Dying, Jason Dixon, NYCBSDCon 2007-g7tvI6JCXD0.flv
[download] 4.4% of 22.62M at 1.43M/s ETA 00:15

As you can see now youtube-dl was even able to detect the downloaded video file name and store it on the computer with a correct name 😉

I would recommend you also to check out the youtube-dl help page, to do use command: youtube-dl –help
 

Convert WAV to MP3 in command line with LAME on Linux

Friday, April 8th, 2011

I needed to convert a bunch of files from WAV to MP3 format on my Linux desktop.

I’ve placed all my wav files to the directory /home/hipo/wav

And then I issued the small one liner script to convert the .wav files to .mp3 using the niftly lame linux mp3 convertor.

Here is how I did it:

linux-desktop:~$ cd wav
linux-desktop:/home/hipo/wav$ for i in *.wav; do
new_name=$(echo $i |sed -e 's#wav#mp3#g');
lame -V0 -h -b 160 --vbr-new "$i" "$new_name";
done

After executing the little script you might go and have a coffee, if you have thousands of files, each file convertion takes about 10-15 seconds of time (speed depends on your CPU).

Here is some output from a lame convertion to mp3 taking place:

Encoding as 8 kHz single-ch MPEG-2.5 Layer III VBR(q=0)
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
27237/27237 (100%)| 0:12/ 0:12| 0:12/ 0:12| 155.89x| 0:00
64 [27237] ***************************************************************
----------------------------------------------
kbps mono % long switch short %
64.0 100.0 84.1 8.9 7.0
If you want to save my convertion quickly for a later, download my Convert WAV to mp3 from a directory with lame shell script here

Actually there are plenty of other ways to convert wav to mp3 on Linux through mplayer, ffmpeg even with mpg123.

There are also some GUI programs that could do the convertion like winff , however for some weird reason after installing WinFF on my debian it was not able to complete convertion to mp3?!
But it doesn’t matter, the good news is I did what I wanted to via the simple lame program and the above script, hope it helps somebody out there.

Script to Automatically change current MySQL server in wp-config.php to another MySQL host to minimize WordPress and Joomla downtimes

Friday, July 20th, 2012

I'm running a two servers for a couple of home hosted websites. One of the servers is serving as Apache host1 and has configured MySQL running on it and the second is used just for database host2 – (has another MySQL configured on it).
The MySQL servers are not configured to run as a MySQL MASTER and MySQL SLAVE (no mysql replication), however periodically (daily), I have a tiny shell script that is actualizing the data from the active SQL host2 server to host1.

Sometimes due to electricity problems or CPU overheats the active MySQL host at host2 gets stoned and stops working causing the 2 WordPress based websites and One joomla site inaccessible.
Until I manually get to the machine and restart host2 the 3 sites are down from the net and as you can imagine this has a very negative impact on the existing website indexing (PageRank) in Google.

When I'm at home, this is not a problem as I have physical access to the servers and if somethings gets messy I fix it quickly. The problem comes, whether I'm travelling or in another city far from home and there is no-one at home to give the hanged host hard reboot ….

Lately the problems with hang-ups of host2 happaned 3 times or so for 2 weeks, as a result the websites were inaccessible for hours and since there is nobody to reboot the server for hours; the websites keep hanging until the DB host is restarted ;;;;

To work-around this I came with the idea to write a tiny shell script to check if host2 is ping-able in order to assure the Database host is not down and then if script determines host2 (mysql) host is down it changes wp-config.php (set to use host2) to a wp-config.php (which I have beforehand configured to use) host1.

Using the script is a temporary solution, since I have to actually find the real hang-up causing troubles, but at least it saves me long downtimes. Here is a download link to the script I called change_blog_db.sh .
I've configured the script to be run on the Apache node (host1) via a crontab calling the script every 10 minutes, here is the crontab:
 

*/10 * * * * /usr/sbin/change_blog_db.sh > /dev/null 2>&1

The script is written in a way so if it determins host2 is reachable a copy of wp-config.php and Joomla's configuration.php tuned to use host2 is copied over the file config originals. In order to use the script one has to configured the head variables script section, e.g.:

host_to_ping='192.168.0.2';
blog_dir='/var/www/blog';
blog_dir2='/var/www/blog1';blog_dir3='/var/www/joomla';
notify_mail='hipo@www.pc-freak.net';
wp_config_orig='wp-config.php';
wp_config_localhost='wp-config-localhost.php';
wp_config_other_host='wp-config-192.168.0.2.php';
joomla_config_orig='configuration.php';
joomla_config_other_host='configuration-192.168.0.2.php';

You will have to manually prepare;;;

wp-config-localhost.php, wp-config-192.168.0.2.php ,configuration-192.168.0.2.php, wp-config-localhost.php to be existing files configured to with proper host1 and host2 IP addresses.
Hope the script will be useful to others, experiencing database downtimes with WordPress or Joomla installs.
 

After a loooongg, looong waiting finally a New Version of Skype 4.0 is out – Skype 4 on Debian GNU / Linux short review

Sunday, June 17th, 2012

After about 3 years of no new version for GNU / Linux finally Skype has released a new version of Skype.
I thought already there will be never a new skype version out for GNU / Linux, since the moment Microsoft purchased skype.

Now suddenly and quite in quiet the new version of Skype 4.0 is out for download from Skype's website. The latest Skype download for Linux is to be found here

As of time of writting this post there are Skype 4 versions for following Linux-es;;;
 

  • Ubuntu 10.04 32 / 64-bit (probably would work fine on latest Ubuntus too)
  • Debian 6.0 Squeeze 32 / 64-bit
  • Fedora 16 / 32 bit
  • OpenSUSE 12.1 32bit (only)
  • Most likely the Ubuntu release of skype 4 will work flawlessly on Linux Mint and other debian derivatives.The The release mentions, Skype 4 is supposed to have 4 major advancements and the gap in interface and usability with latest Mac OS and M$ Windows Skype versions is now filled.The four major changes said in the announcement are;;;

  • 1. a new Conversations View where users can easily track all of their chats in a unified window.
    Those users who prefer the old view can disable this in the Chat options;
  • 2. a brand new Call View;
  • 3.Call quality has never been better thanks to several investments we made in improving audio quality;
  • 4. Improved video call quality and extended support for more cameras.
  • Some of the minor improvements in those

  • new Linux skype
  • are:- improved chat synchronization- new presence and emoticon icons- the ability to store and view phone numbers in a Skype contact's profile- much lower chance Skype for Linux will crash or freeze- chat history loading is now much faster- support for two new languages: Czech (flag:cz) and Norwegian (flag:no)Just like with prior Skype releases 2.0 and 2.2beta this release comes with almost same list of non-english language support ,,,Seeing those announcement, I've hurried to download and test skype 4 on my 64-bit desktop running Debian 6 Squeeze.Once downloaded to install the pack skype-debian_4.0.0.7-1_amd64.deb I used the usual dpkg -i i,e,;;;noah:~# dpkg -iskype-debian_4.0.0.7-1_amd64.deb…………..Just like the release announcement mentions the first initial launch of Skype 4 took about 3 or 4 minutes doing something (probably sending half of my hard disk data to Microsoft 🙂 🙂 🙂 ) along with importing the prior skype data and chat history :)The minimum software dependencies for correct operation of Skype are:Qt libraries; D-Bus; libasound and pulseaudioHere are few screenshots of Skype 4 to give you an idea what to expect:The Skype Options is almost identical to Skype 2.2. One interesting new feature I've noticed is Skype WIFIUnfortunately to use Skype WIFI you need to have purchased skype credits.Another notable difference is the organization of Skype Chats, which is more like in the good old times of mIRC and IRC chat clientsHere is also the list of Skype emoticons including bundled with Skype 4:The "look & feel" of the new interface gives the impression of seriously improved Skype client stability too.There was a minor trouble with the voice recording (microphone) with Skype 4;To make the microphone work properly I had to raise up the mic volume from PulseAudio settings in Skype options.Well that's all the only unpleasent thing for this new skype is it is using KDE's libQT and seems not to have a native interface for GNOME via GTK2. If we put away this I guess this version of Skype is much more stable and therefore I would recommend anyone to update.Of course we never know if this new updated more stable Skype release is not filled up with backdoors or does not transfer all our conversations to microsoft but we didn't know that even when Skype was not Microsoft's so and since it is not a free software I guess it doesn't matter so much.As you can guess Microsoft has imposed centralization on Skype protocol so connecting the peers is now done by Microsoft servers this news is another intriguing one.According to one recent article from May 1, 2012 Microsoft Skype replaces the Peer-to-Peer P2P supernodes with Linux boxes hosted by Microsoft – In short that probably means that by changing this nowdays microsoft probably now logs all chat sessions between Skype users, even it is likely the calls between users are recorded too. We all know Microsoft imperialism pretty well so I guess this is not a big news …..This new release of Skype if it is significantly more stable than it is prior releases would certainly have serious positive implication on the development and adoption of Linux for the Desktop. So far I'm sure one of the obstacles of many manufacturers of notebooks and comp equipment to ship with Linux was the lack of a stable and easy to implement skype release for Linux.Well that's all folks. Enjoy the New Skype Cheeres ! 🙂