Power of Android

Was studying about android, as its being famous in mobile technology these days. Here is summery of my first research.

What is Android?
Android is nothing but a software platform for mobile devices which are based on most flexible operating system i.e. Linux. Android is developed by Open Handset Alliance and acquired by Google. Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

History of google and Android.
Google acquired Android in in July 2005. Early it was a small start up company (actually 22-month-old startup) based in palo alto, CA. Co founder of this company - Andy Rubin, Rich Miner, Nick Sears, Chris White.

Android Development
Android applications are written in the Java programming language. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java.
Download Android SDK

An Android package archive file marked by an .apk suffix. This file is used for distribution and installation of the application on the mobile device.

Power of Android application.

  • Phone's core applications and third-party applications are treated equally.
  • Android actually breaks down all the barriers of application development by providing lots of libraries and tools. e.g Android enables developers to obtain the location of the device.
  • By default, every Android application runs in its own Linux process.
  • Every application has its own virtual machine. So the app runs in isolation from other apps.
  • Each application is assigned a unique Linux user ID which is set with some permissions required by the perticular application only. Where as it is also possible that two or more android application share a same user id in some cases.

Android Architecture
android architecture

BASH shell script to rename file that has spaces

R  you looking for shell script which rename all files in a directory to replace unnecssery spaces in file names with -. Check following BASH shell script which,

1. Iterate a perticular directory specified in FILES variable.
2. Replaces spaces with - hyphen, and put it in temparary variable new_file. (sed "s/ /-/g"`)
4. Then simple MV command to rename it.

  1. #!/bin/bash
  2. FILES=/path/to/dir/*
  3. for f in $FILES
  4. do
  5. new_file=`echo $f|sed "s/ /-/g"`
  6. if [ "$f" != "$new_file" ]
  7. then
  8. mv "$f" "$new_file"
  9. fi
  10. done
  11. exit 0

papa kehtain hai acoustic guitar notations


D| E|----------------------------------------------------------------||
H| B|----------------------------------------------------------------||
A| G|-------------------------5---7----------------------------------||
N| D|----------7----5---7-----------5-----------7--------------------||
E| A|--5-5--------------------------------6-5------------------------||
S| E|----------------------------------------------------------------||
M| papa kehte hai bada nam karega
N| E|----------------------------------------------------------------||
E| B|-------------------------------------------8-8-----7-8----------||
| G|--5-7----------------------7-7----7-7---5-------------5---------||
T| D|-------5-5------5-5--4------------------------------------------||
A| A|----------------------------------------------------------------||
B| E|----------------------------------------------------------------||
| magar ye to koi na jane ke meri manjil hai kaha


How can we restrict ip based access to phpmyadmin directory

I was working on this in last week and I came to know following solution. There can be other ways too , but I am not sure. So I am just explaining the way I did it for my site.

1. You can edit phpMyAdmin.conf (located at /etc/httpd/conf.d/) file in vi editor.
2. Following code block should be there.

< directory /var/www/phpMyAdmin >
DirectoryIndex index.php
Options Includes ExecCGI
AllowOverride None
Order deny,allow
Allow from all
< / Directory >

3. Add new line "Allow from ip.ip.ip.ip", check code below.

< directory /var/www/phpMyAdmin >
DirectoryIndex index.php
Options Includes ExecCGI
AllowOverride None
Order deny,allow
Allow from ip.ip.ip.ip
Allow from all
< / Directory >

please put your comments if you have any suggestions or doubts about this implementation.

Editing phpmyadmin.conf to restrict access change alias

If you want to change alias of your phpmyadmin directory then you just need to edit your phpmyadmin.conf file and update following line.

- vi phpmyadmin.conf (if you use windows then just use any editor. I like linux)
- Alias /aliasname /var/www/phpmyadmin
- done

vi phpmyadmin.conf - Will open phpmyadmin.conf file in vi editor.
aliasname - you can set any new string here

So next time you can hit http://localhost/aliasname instead of http://localhost/phpmyadmin.

Related Questions?
How to give ip based restriction to phpmyadmin directory.

Looking out for online regular expression tool

Check this cool tool to create regular expressions online.

Regular expression test tool

Top MySQL Performance Tuning Tips

Wondering around some set of tips to increase our MySQL tables speed and performance.

Found some useful tips at following urls. check out, its really good.

  • http://forge.mysql.com/wiki/Top10SQLPerformanceTips
  • http://www.ajaxline.com/32-tips-to-speed-up-your-mysql-queries

Share this post with your friends