Change sizes of gnome desktop background

A simple script to change the background.   Just a simple bash script for changing the position of your wallpaper, and it works on Fedora 18;) #!/bin/bash OPTIONS=”Centered Scaled Spanned Zoom Stretched Wallpaper Quit” select opt in $OPTIONS; do if [ “$opt” = “Centered” ]; then gsettings set org.gnome.desktop.background picture-options “centered” echo You choose the… Read More »

Quick tricks on shell

I was working on a project that involves moving data from one point to other, it involves a verity of commands. I am listing some useful tricks. 1. This script is a tiny script to compress, generate md5 and transfer any directory. tar cvJf $1.tar.xz $2; md5sum $1.tar.xz > $1.md5sum scp -i<private key> -P<port> $1.md5sum <user>@<hostname>:<path>… Read More »

Overcome a bug to add unofficial repos in arch

I was struggling to add an unofficial repo for amd catalyst. When I tried to add the key I get a strange error. “connecting to dirmngr failed” simplest hack to solve it is to give the following command from root. sudo -i dirmngr < /dev/null this will create necessary stuff for gpg. after the pacman-key… Read More »

Find the fastest mirror in arch linux

This command finds the fastest mirror. The contry option is to narrow down the search as well as other options. reflector -p http -c ‘United Kingdom’ –threads 2 -f 5 -n 5 –sort rate > /etc/pacman.d/mirrorlist If you don’t want to disturb mirrorlist file then skip the last part. reflector -p http -c ‘United Kingdom’… Read More »

Install debian on chromebook acer c720

Acer C720 is compact and very handy. It is packed with celeron 1.40 GHz processor and 2 Gigs of ram with 32 GB SSD. It has a ~4100mAh battery which should last for 4+ hours with debian without X. I did a quick search and found a way to install debian on to this device.… Read More »

Setup of django, virtualenv and dependencies using pip

Recently I started working on a django project which is exciting at the same time challenging. I thought its good time to document some of the steps to deploy the project and these are the steps to follow. System requirements In a typical debian system run the following commands to get required packages before we… Read More »

configure mymine app for self-signed certs

Mymine is a cool app for redmine. Their is one problem thought I was not able to configure mymine with self-signed certificate instance of redmine. I found a way to make it work. These are the steps to configure mymine to work with self-signed certificate sites. Step 1 (Get the cert) Enter sites URL in… Read More »

Creating postgresql Database and user in a nutshell.

I will not write much but just the code required to create a user and let the user access the db. Create UserCREATE USER tom WITH PASSWORD ‘myPassword’; Create a DBCREATE DATABASE jerry; Grant Privileges to user on the DBGRANT ALL PRIVILEGES ON DATABASE jerry to tom; Grant Privileges to table GRANT ALL PRIVILEGES ON… Read More »

Single line to send an alert mail from shell

The power of shell and how simple it is to send a mail when every some one logs in as root to a predefined email. echo ‘ALERT – Root Shell Access (message or DNS) on:’ `date` `who` | mail -s “Alert: Root Access from `who | cut -d”(” -f2 | cut -d”)” -f1`” <email id>