Nice discussion on Control Panel ( free ) for VPS.

http://xmodulo.com/free-control-panel-for-vps.html

 

Enjoy the discussion and information if you are looking for free control panel for VPS or some other host.

repotrack and repoquery -commands to resolve dependencies.

To get all the depencies of a package, you can try:

repoquery -a --requires --resolve 

Example output:
glibc-0:2.20-5.fc21.i686
bash-0:4.3.30-2.fc21.x86_64
chkconfig-0:1.3.63-1.fc21.x86_64
glibc-0:2.20-5.fc21.x86_64
openssl-libs-1:1.0.1j-1.fc21.x86_64

and then to query in nice tree format, you can use :

 repoquery -a --tree-requires PACKAGE_NAME

And finally use that with repotrack:

repotrack -a x86_64 -p . $(repoquery --qf=%{name} -g --list --grouppkgs=all 'Office Suite and Productivity' |tr '\n' ' '
)

Now for the fun part, why use all the above when you can simply use:
yumdownloader --resolve 

So, if you have reached this line then you don't need repotrack/repoquery, simply use yumdownloader :)

PHP Image gallery with fancybox.

So, I was looking for some quick to setup PHP Image gallery file. I found couple but none of them suited my needs too well. So I had to write my own.

Very simple PHP script to show all the images under ‘images’ folder.

Shows some details in the images.

 

That is all that I wanted and that is all that this script does. So pretty simple single php file. Dependency is on fancybox so you will need the jquery and all but nothing else is required.

https://github.com/raj77in/PHP-ImagaeGallery.git

script to get hard disk health in fedora/ubuntu

First, put this in a script.

#!/bin/bash

#Change as appropriate
HDD=sda

export sub="SmartCtl data for HDD"
echo 'To: <Your Email>
Sub: [Cron] $sub
MIME-Version: 1.0
Content-Type: text/html
Content-Disposition: inline

<html><pre>'


echo '<style>

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}
</style>
'

echo '<h2>Errors on HDD:</h2>'
echo '<hr>'
sudo smartctl -l error  /dev/$HDD
echo '<h2>Health of HDD:</h2>'
echo '<hr>'
sudo smartctl -H  /dev/$HDD

echo '<h2>Detailed info</h2>'
echo '<hr>'
sudo smartctl -a -d ata /dev/$HDD

echo '<h2>Journalctl output for smartd</h2>'
echo '<hr>'

if [[ -f /etc/fedora-release ]]
then
journalctl -x --show-cursor -u smartd --since=yesterday
else
#This is for Ubuntu.. still using dmesg

dmesg -T -l err,crit,alert,emerg

fi


echo '<h2>All Details</h2>'
echo '<hr>'

sudo smartctl --xall /dev/$HDD


echo "Thanks for using Amit Agarwal's script"
echo '</pre></html>'

and then put this in cron:

30 15 * * 5 <script name> |/usr/sbin/sendmail -t

You need to have mail configured to receive the mails.

Whaaw! light weight media player

Description : Whaaw! Media Player is a lightweight media player that supports fullscreen
            : mode, seeking, changing video colour settings and more. It will play any audio
            : or video files that GStreamer can play. It is intended to be a basic media
            : player without any GNOME dependencies.

So, this is light weight media player with not too many features but does good as a simple media player.

To install:

 

sudo yum install whaawmp

ncurses based eFTE editor – programmers lightweight editor

nefte is a lightweight programmers editor. Here is descriptioin:

 

Description : eFTE is an advanced programmers editor with goals of being lightweight, yet
            : totally configurable. Support for user defined programming languages, menu
            : systems and key bindings are provided with many common defaults already
            : defined. eFTE is still a new project, however, we extend from the FTE editor
            : which was first released in 1995, so eFTE is tried and true with many features
            : for the programmer/text editor.
            : 
            : This package contains nefte, the ncurses version of the editor.

And to install:

sudo yum install nefte

nefte a.sh

There are lot of features taht you can explore and use.
It is quite lightweight programmers editor.

nomacs – light weight image viewer

To install:

1
sudo yum install nomacs

nomacs is a very light weight viewer for images with some fetures that you find useful (rotate image,
crop and see in 1:1. Not too much features but definately very light weight and good for daily use.

Description : nomacs is image viewer based on Qt4 library.
: nomacs is small, fast and able to handle the most common image formats.
: Additionally it is possible to synchronize multiple viewers
: running on the same computer or via LAN is possible.
: It allows to compare images and spot the differences
: e.g. schemes of architects to show the progress).