Things which I do after installing Crunchbang #! Linux.

Leave a Comment
Configure your Crunchbang #!.

5 Things that I do after installing the #! and this will also help you.
If you are a developer then obviously you require more packages to install in your system.

1. Update your #! source-list to install non-free packges.

ashish@crunchbang:~$ sudo nano /etc/apt/sources.list

## Compatible with Debian Wheezy, but use at your own risk.
deb waldorf main
deb-src waldorf main

deb wheezy main contrib non-free
deb-src wheezy main contrib non-free

deb wheezy/updates main
deb-src wheezy/updates main
Now update your #! crunchbang and install 32-bit library packages which is gonna help you with the installation of skype, teamviewer, android development kit etc.

sudo dpkg --add-architecture i386  
apt-get update
sudo apt-get install ia32-libs
#! comes with linux a media player, let's install a Clementine(music player). I prefer this because of it's simplicity.

sudo apt-get install clementine

2. Change your login screen wallpaper. I don't prefer to use default login wallpaer which comes with the #!. So I change it using the below method.

ashish@crunchbang:cd /usr/share/slim/themes
ashish@crunchbang:/usr/share/slim/themes$ sudo thunar
It will open file browser where all the themes are located. Open any one of them and you will find the "background.png", this image file is used as login-background.
I'm going to use "default" theme as my login-theme.
1. Replace "default/background.png" file with your wallpaper images.
2. Rename "default/background.png" to "default/background_backup.png.".
3. Place your desired wallpaper in "default" directory and change your wallpaper name as "background.png".
4. Cross check, make sure you are doing all these stuff inside "/usr/share/slim/themes/default/" directory.
5. If you know little bit photo editing tool "gimp", then you can modify "panel.png" image(your login panel).
6. Activate the theme and logout to check the effect.
Activate : super[windows btn] + space[btn] >>> System >>> User Login Settings >>> select Theme as "default".
3. Beautify your conky.
super[windows btn] + space[btn] >>> Settings >>> Conky >>> edit .conkyrc
Replace your conky settings with the below text.

# conky configuration
# The list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check for an up-to-date-list.
# For ideas about how to modify conky, please see:
# For help with conky, please see:
# Enjoy! 
# Settings
background yes
use_xft yes
xftfont HandelGotD:size=8
xftalpha 0.5
update_interval 4.0
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 5
maximum_width 220
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
default_color grey
default_shade_color red
default_outline_color green
alignment top_right
gap_x 5
gap_y 45
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no

CPU $alignr ${cpu cpu0}%
${cpugraph cpu0}

MEM $alignc $mem / $memmax $alignr $memperc%

swap $alignc $swap / $swapmax $alignr $swapperc%

/ $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_free_perc /}%
${fs_bar /}

global $alignc ${fs_used /home/karlos/global} / ${fs_size /home/karlos/global} $alignr ${fs_free_perc /home/karlos/global}%
${fs_bar /home/karlos/global}

$processes processes ($running_processes running)

${top name 1} $alignr ${top pid 1} ${top cpu 1}
${top name 2} $alignr ${top pid 2} ${top cpu 2}
${top name 3} $alignr ${top pid 3} ${top cpu 3}
${top name 4} $alignr ${top pid 4} ${top cpu 4}
${top name 5} $alignr ${top pid 5} ${top cpu 5}
${top name 6} $alignr ${top pid 6} ${top cpu 6}
${top name 7} $alignr ${top pid 7} ${top cpu 7}
${top name 8} $alignr ${top pid 8} ${top cpu 8}
${top name 9} $alignr ${top pid 8} ${top cpu 9}

Inbound $alignr ${downspeed eth0} kb/s
${downspeedgraph eth0}
Outbound $alignr ${upspeed eth0} kb/s
${upspeedgraph eth0}

Wifi Inbound $alignr ${downspeed wlan0} kb/s
${downspeedgraph wlan0}
Wifi Outbound $alignr ${upspeed wlan0} kb/s
${upspeedgraph wlan0}

Alt+F2$alignr Run Dialog
Alt+F3$alignr Alt Menu
Super+space$alignr Main Menu
Super+t$alignr Terminal
Super+f$alignr File Manager
Super+e$alignr Editor
Super+m$alignr Media Player
Super+w$alignr Web Browser
Super+g$alignr Graphics Editor
Super+l$alignr Lock Screen
Super+v$alignr Volume Control
Super+x$alignr Logout
PrtSc$alignr Screenshot

There are more yet to come.... Thanks for reading.

Signature Spider at National Park.

Leave a Comment
I found this spider at Borivali National Park. When I clicked the pic I never knew that this is the signature spider, on of my friend told me about this so I googled it and here is the information. For me it's a WEB DEVELOPER who don't forget to mention copyrights on his web-site. :) These spiders make certain zig-zag pattern on web therefore also known as writer or signature spider.This spider weaves four zig zag stripes in its web, and holds its legs together in pairs. It holds its legs in pairs to disguise itself as a four legged creature; it does this to not appear to look like a spider. These spiders have many names around the world, they are known as an Argiope, a Black and Yellow Garden Spider or a Writing Spider in North America. It is known as Wasp Spider in Germany and the rest of Europe and the St Andrews Cross spider in Austrailia. They know it as KOGANE-GUMO in Japan and east asia. There are 75 different species of this spider but they all look the same. Their colours vary in between their stripes but they all keep the black and yellow stripes, They distribute also Sri Lanka, Maldives,India, Pakistan.Their habitats are Moist Deciduous forests in the sunny parts.

Alternative of google-map API, making request more than 2500.

Leave a Comment
I was looking for a free api which can help me to get latitude/longitude on the basis of Postcode.

I tested pygeocoder and other api librearies which can help me, but none of them allowed me to query more than 25,000/day cause everyone is belongs to Google.

So I did an old school coding by using Mechanize and BeautifulSoup.
I used It's a free, I think they are providing 30,000 requests for demo user, I didn't tested 30,000 requests cause I've 29,000 records to generate lat/long. I don't want to waste my hits for a day. I'll test and update here.

Code is not clean, cause it's a test.

Keep Coding .

import mechanize
from bs4 import BeautifulSoup 

for x in xrange(30000):

    print '----------------- searching ---------------'
    br = mechanize.Browser()"")
    add = '81100'
    br.form["address"] = add
    for i in range(0, len(br.find_control(type="checkbox").items)):
        br.find_control(type="checkbox").items[i].selected =True
    print 'hitting --- ',x
    response = br.submit()
    soup = BeautifulSoup(response)
    links = soup.find_all('li')
    print '--------- getting list ----------'
    li = soup.find('div', {'class': 'summary'})
    print '---------- looking for latitude and longitude -------------'
    list= []
    children = li.findChildren()
    for child in children:

    print ' found latitude and longitude at point -->  ',x
    latitude = list[0]
    longitude = list[1]
    lat = latitude[9+5:len(latitude)-5].split()
    lng = longitude[9+6:len(longitude)-5].split()
    print str(lat).replace(',','.')
    print str(lng).replace(',','.')

#for f in br.forms():
#    print f

Source Code :

Metallica Poster -Kalaghoda, Mumbai

Leave a Comment

Changing wallpapers in Crunchbang #! Linux .

Leave a Comment
I'm using crunchbang #! when it was #!-9 around in 2010 , now using #!-11. Between these period I tested out many linux distros but never feel that any linux is stable as #! is now, because it drops Ubuntu and using Debian-stable :) .
As per the heading of this post to change wallpaper in Crunchbang we need to copy paste the wallpapers( images ) into following directory./home/[username]/images/wallpapers/shared/
But "shared" folder is locked, so we need to copy-paste the images as a "sudo" user. Please Follow the steps.
1 Press "alt+f2" then enter "sudo thunar" and enter your password.
2 Now copy your wallpaper(images) and paste it into "/home/[username]/images/wallpapers/shared/" directory.
3 "Right-click" on the desktop and navigate to " settings > Choose Wallpaper ".
4 Now you can easily see the images and set the wallpaper by selecting images and clicking on "apply" button.

Here is my wallpaper link

Wait for the next crunchbang post. Keep Coding :)

Network Manager not running on Ubuntu12.04 at boot-time

Leave a Comment
I was configuring PPPOE connection manually by command line using "sudo pppoeconf", and by mistake I changed some settings. So after I restarted my laptop, I was getting an boot time error "waiting for network configuration" and after some time "waiting upto 60 seconds more for network configuration.."
Also there are possibilities to get this error while upgrading the system.
I solved these problem by using 2 methods.
After logged into Ubuntu.
Open terminal, type
First : not a permanent solution
  sudo /etc/init.d/network-manager start
Second : permanent solution
  sudo gedit /etc/network/interfaces
And remove the lines after
  auto eth0
  iface eth0 inet loopback
Make sure to save the file before closing it.Reboot the system

Sending Email : Django Terminal Test.

1 comment

While I was making contact-us form in PHP for my client then I thought about to do same in Djago-Python. Target was to get the form input and email it. Here I'm going to test only the DjangoEmail module using shell.
Edit with code below:
    #settings for django email( writing for gmail)
    EMAIL_USE_TLS = True
    EMAIL_HOST = ''
    SITE_HOST = ''
    DEFAULT_FROM_EMAIL ='Dotorbit Team '
    EMAIL_PORT = 587
    EMAIL_HOST_PASSWORD = 'your-password'
    #Run interactive mode, 
    python shell
    #Import the EmailMessage module,
    >>>from django.core.mail import EmailMessage
    #Send the email,
    >>>email = EmailMessage('Subject goes here ', ' Body goes here ', to=[''])

This will return 1, means everything is working fine. form and view, I'll write in next post.

Configure LAMP and How to fixing Apache issue ServerName issue.

Leave a Comment

There are lots of tutorials available for Apache,MySql and PHP installation on linux and Windows. But I prefer the simple one for Debian.Command will not work without caret(^). sudo apt-get install lamp-server^ Now,This will download and install the Apache,PHP and MySql. step1 : test "localhost" in browser. Works !!
step2 : run the apache2 service. $ sudo service apache2 restart
$ sudo /etc/init.d/apache2 restart
If it works !! You are champ.
For me ,It throws an error --
codeleaf@dotorbit-backbox:/media/Development/Developer/HEROKU/DotOrbit$ sudo service apache2 restart
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
I googled about it and found the solution,
By default "httpd.conf" file will be blank. Now, simply add the following line to the file. $ sudo gedit /etc/apache2/httpd.conf Add the following line to "httpd.conf" and save it . ServerName localhost Now restart the server. $ sudo service apache2 restart
$ * Restarting web apache 2 server
... waiting
Woohoo.. It works
step3 - Test whether PHP is working or not ? Create "test.php" in /var/www/ directory. $ sudo gedit /var/www/test.php and add following line " < ?php phpinfo(); ? > step 4 - Test localhost/test.php and you will get the info page. e.g "PHP Version 5.3.10-1ubuntu3.4"

How to install 686-PAE kernel on Linux Mint Debian Edition-i486?


Before using Linux Mint Debiab Edition(LMDE) I was using Ubuntu-12.04LTS .
It was my worst experience with ubuntu. It looks like Ubuntu12.04LTS is not matured. I've faced lots of problems like touchpad freezes , after updates system get crashed , lots of bug reporting etc . Anyway I'm not anti-ubuntu .
In frustration I removed Ubuntu12.04 and installed LMDE on my Dell Vostro-1540 (core-i3).
Since the kernel is built with LMDE 201 109 486, then the default kernel is only able to detect a single core . Result was ,I've experienced some sort have 'hang' during my Android application development .
I decided to install the kernel 686, exactly 686-PAE. This kernel is the best solution for running LMDE on 'multi-core' system .
No need to worry about it .
Simple steps are here to install linux-kernel-i686.
 $ sudo apt-get update
 $ sudo apt-get install linux-image-686 linux-headers-686-pae
for i486.
 $ sudo apt-get update
 $ sudo apt-get install linux-image-486 linux-headers-486
for amd64.
 $ sudo apt-get update
 $ sudo apt-get install linux-image-amd64 linux-headers-amd64

Working on blogger template .

Leave a Comment

Working on Blogger templates !! codesucksmybrain !! :)