Skip to content

database and wordpress backup cron job

i want to run a cron job that back ups my mysql database and my wordpress files once a day from the hostgator cpanel. i found a sample script and edited the parameters with my information but it doesn’t seem to be working properly. I don’t have much experience with cron jobs so i’m not sure …

Porting my PyGtk 3 app to Win32

I recently made my first app with pygtk using Anjuta. It works well under Linux, so it’s time to share it with relatives and friends. I installed Python, pygtk and the Gtk all-in-one bundle (Cairo, pyGobject ect) on windows and tried to run it. I had an error saying self.builder.add_from_file(UI_FILE) D…

how to unlimit the number of group for one user in centos4/5

If one user have more than 16 groups, it will cause that the groups don’t work for permission control. How to unlimited this number of groups per user in Centos4/5 ? Answer You can’t unlimit the additionnal groups per user. But you can raise the limit. Beware that most Unix systems are limited to …

Run scripts remotely via SSH

I need to collect user information from 100 remote servers. We have public/private key infrastructure for authentication, and I have configured ssh-agent command to forward key, meaning i can login on any server without password prompt (auto login). Now I want to run a script on all server to collect user inf…

Make’s output, the number in the brackets

What’s the significance of the number in the square brackets in Make’s output? Is make multi threaded and this is the thread’s number, or is it the level of makefile traversal, or what exactly? It’s larger numbers on my big projects, but on my personal ones (with just a few source file…

Checking for installed packages and if not found install

I need to check for installed packages and if not installed install them. Example for RHEL, CentOS, Fedora: How do I do a check in BASH? Do I do something like? And what do I need to use for other distributions? apt-get? Answer Try the following code : or shorter : For debian likes : For archlinux :

How to run hrtimer handler in softirq context?

I have found this tutorial about hrtimer: http://www.ibm.com/developerworks/linux/library/l-timers-list/ I believe the way it uses will run the callback handler in hardirq context,right? But it also said “One interesting aspect is the ability to define the execution context of the callback function (suc…

QPainter Save State

I have a QWidget in which I use a QPainter object to draw some dots but when update() method is invoked, the QWidget’s draw is cleared completely. Is there any way to save the actual state and just add dots, or i have to save every dot and paint them in every paintEvent() call ? Basically when I press a…

Python: Print next x lines from text file when hitting string

The situation is as follows: I have a .txt file with results of several nslookups. I want to loop tru the file and everytime it hits the string “Non-authoritative answer:” the scripts has to print the following 8 lines from that position. If it works I shoud get all the positive results in my scre…