Wednesday, August 25, 2010

How to turn a jpeg image into a sketch in Gimp

  1. Start gimp on your computer and load the jpeg image you'd like to work with into the gimp.
  2. Go to colors; then desaturate-average.
  3. Go to filter and select edge.
  4. Now, got to colors and select invert.
  5. You now have a sketch of your photo. Now go to colors, then levels and play with the values until you are satisfied with the intensity of the sketch.
  6. Save your image and your done!

Saturday, August 14, 2010

Activating the User's public_html Directory with userdirectory (Using Apache2 )


Create a directory (folder) called "public_html" in your home directory, with your file browser or the command below. Do NOT use the sudo command.
me@myhost$ mkdir public_html

I have found that on a simple development machine, it is easier to have your work all within your own home directory and not have to worry about permissions and folders owned by the root user. What it gets you is the ability to access your websites in your home directory by a URL in the form http://localhost/~USER_NAME. We can improve upon this with fake domains, but first things first.
There are only two commands you need to enter to activate the User Directory feature, and then one command to reload the configuration files. The last command includes an absolute path, so it doesn't matter where you execute it from. The first two "ln" commands assume you are in the directory /etc/apache2/mods-enabled. What you need to do is create two symbolic links (soft links, symlinks) in the stated directory pointing to the corresponding module in /etc/apache2/mods-available. So, if "$" is your prompt,
me@myhost$ cd /etc/apache2/mods-enabled
me@myhost$ sudo ln -s ../mods-available/userdir.conf userdir.conf
me@myhost$ sudo ln -s ../mods-available/userdir.load userdir.load
me@myhost$ sudo /etc/init.d/apache2 restart
me@myhost$ sudo gedit /etc/apache2/mods-available/php5.conf
you will see a file like the one below :



SetHandler application/x-httpd-php


SetHandler application/x-httpd-php-source

# To re-enable php in user directories comment the following lines
# (from to .) Do NOT set it to On as it
# prevents .htaccess files from disabling it.


php_admin_value engine Off




Now change it to look like the one below and then save it :



SetHandler application/x-httpd-php


SetHandler application/x-httpd-php-source

# To re-enable php in user directories comment the following lines
# (from to .) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
#
#
#php_admin_value engine Off
#

#

#



Monday, August 9, 2010

Backup MySQL Database to a file

Backing up your database is a very important system administration task, and should generally be run from a cron job at scheduled intervals. We will use the mysqldump utility included with mysql to dump the contents of the database to a text file that can be easily re-imported.
Syntax:
mysqldump -h localhost -u root -pmypassword databasename > dumpfile.sql
Example:
mysqldump -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql
This will give you a text file containing all the commands required to recreate the database.

Install an RPM Package on Ubuntu Linux

Installing software on Ubuntu usually entails using Synaptic or by using an apt-get command from the terminal. Unfortunately, there are still a number of packages out there that are only distributed in RPM format.


There’s a utility called Alien that converts packages from one format to the other. This doesn’t always mean that an rpm will work on your system, though. You will need to install some prerequisite software packages in order to install alien, however. These packages include gcc and make.
Run this command to install alien and other necessary packages:
sudo apt-get install alien dpkg-dev debhelper build-essential
To convert a package from rpm to debian format, use this command syntax. The sudo may not be necessary, but we’ll include it just in case.
sudo alien packagename.rpm
To install the package, you’ll use the dpkg utility, which is the internal package management tool behind debian and Ubuntu.
sudo dpkg -i packagename.deb
The package should now be installed, providing it’s compatible with your system.

Sunday, August 8, 2010

Red Eye Removal using Gimp

See an example of red eyed picture over here::
chris  and tori with red eyes
Launch GIMP and then open your photo. Select the rectangle tool.
    gimp  rectangle tool
    Draw a rectangle around the red eyes.
gimp  rectangle tool selecting red eyes
Now select Filters -> Enhance -> Red Eye Removal…
    gimp filter  for removing red eye
    The Red Eye Removal tool will pop up. Use the Threshold scroll bar to adjust the eye color as you see fit. Click OK when you’re done.
gimp  red eye removal threshold
The changes will be applied to your photo.
    gimp  red eye removal
    Use the Zoom feature if you need to remove red eyes from someone who also has red hair (or a wig
    ) that’s getting in the way. You can even select one eye at a time.
      gimp  red eye removal closeup
      And the finished product –
      no  more red eyes

Sunday, August 1, 2010

Problems during Compilation of LaTeX files

Hello to all, I am sorry for not posting this message earlier. But when Now I prepared my synopsis and make its template and send to others then I came to know that i forgot to tell about how to include extra packages to be used in LaTeX file.

For that you just need to create directory structure as shown below in your home folder:
/home/username/texmf/tex/latex
and after that now you have to install extra packages. Note down .sty file error which terminal gives you when you are compiling your .tex file. Now search the Internet for that .sty file named package like if I have demo.sty file error then I will look for demo latex package. After you download this package you need to install it on the system. Just placed the folder(demo say) under latex folder. Then go to terminal & type:
$sudo -s
#cd /texmf/tex/latex
#texhash demo(in place of demo you can have package name)
That's it file will be updated and your package will be installed.