Actionmailer


Hi frinds,

I created a module for random password generation using “Actionmailer” in rails 3  🙂

And also I’m trying to find a solution for sending password to mobile via sms.

but i didn’t succeed so for. 😦

I think their is no sms provider in india. If anyone know, pls let me know  !

check this link http://actionmailer.heroku.com/

I’ll tell the simple procedure to play wit actionmailer on my next post 🙂

Install “Opera 11.01” Web Browser on Fedora/linux


Hi friends,

 

1. Download the Opera binray file from Opera. Make sure you choose Fedora from the drop down list.

2. Go to your Downloaded path/folder “Just do the Double click on the .rpm file and follow the instructions

3. That’s all 🙂 

 

This slideshow requires JavaScript.

 

 

How to change “wordpress” blog address ! (i.e site URL)


Hi friends,

After long time i came to know, in wordpress there is option to change our wordpress blog address. 😉 My friend Mr.Rakesh told to me the procedure, here the simple trick.

Step1:

Click the “My blogs” under “Dashboard

Step2:

  • After clicking the “My blogs” you can see a window that lists the number of blogs maintained by you.
  • Move the mouse over your blog address and you can see a link “Change Blog Address“.
  • Now click that link.

Step3:

  • Enter the New Blog/Site Address
  • Check the “No” Radio button under ” Matching Username?
  • Check the “Yes” check option under “Discard Current Address?
  • Click “Continue” Button

Step4:

  • Click on “I’m sure” button to confirm 🙂

This slideshow requires JavaScript.

That’s all.


How to Create Centralized Local “Git Repository”


Hi friends,

Lets see “How to Create Centralized Local “Git Repository

First we have to install “git-core” on both server and client. here I’m using Fedora, So I’m installing using “yum install”. Ubuntu people may use “apt-get install”

[server] $ sudo yum install git git-core

[client] $ sudo yum install git git-core

—-

[client side]

Go to the project Directory using “cd” command.

$ cd project_directory

$ git init

$ git add .

$git commit -m “First commit”

Assume your project is in the directory ~/project. Now we have to create a clone of that project using “–bare”

$ git clone –bare ~/project project.git

Next, copy project.git to the server where you plan to host the public repository. You can use scp, rsync, or whatever is most convenient.

$ scp -r project.git servername@ipaddress:/path_to_dir

Now we copied the project into the “Server Repository”.That’s All.

Then, When you need to clone (or) pull, Create new directory and go insde of that dire., When we cloned a project from server repo., just start with that cloned project and make modifications and make commits using “$ git commit -m “message” then just use “$ git push” to push the modified project. 🙂

$ mkdir cloned

$ cd cloned

$ git clone servername@ipaddress:/path_to_dir/project

Ex:

[rajee@localhost pro]$ git clone --bare sample_app/ sample_app.git
Cloning into bare repository sample_app.git...
done.
[rajee@localhost pro]$ scp -r sample_app.git/
suresh@192.168.1.9:/home/suresh/git-repo

[rajee@localhost ~]$ cd cloned/
[rajee@localhost cloned]$ ls
fapp  testdir  testdir.git

[rajee@localhost cloned]$ git clone suresh@192.168.1.9:/home/suresh/
git-repo/sample_app.git
Cloning into sample_app...
suresh@192.168.1.9's password:
remote: Counting objects: 491, done.
remote: Compressing objects: 100% (451/451), done.
remote: Total 491 (delta 210), reused 0 (delta 0)
Receiving objects: 100% (491/491), 214.64 KiB, done.
Resolving deltas: 100% (210/210), done.

[rajee@localhost cloned]$ ls
fapp  sample_app  testdir  testdir.git
[rajee@localhost cloned]$
suresh@192.168.1.9's password:

[rajee@localhost rails_projects]$ cd sample_app
rajee@localhost rails_projects]$ # make modifications
[rajee@localhost rails_projects]$ git push

 

That’s all.

 

ssh: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!


Hi friends,

Today i faced a different problem on “ssh” connection. When i tried to connect a machine with mine, a new problem arrived. 😉 It’s look like the following,

[suresh@mercury ~]$ ssh rajee@192.168.1.7
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
25:e5:2b:dd:98:df:c8:f6:36:28:10:3d:c3:93:83:b0.
Please contact your system administrator.
Add correct host key in /home/suresh/.ssh/known_hosts to get
rid of this message.
Offending key in /home/suresh/.ssh/known_hosts:5
RSA host key for 192.168.1.7 has changed and you have requested
strict checking.
Host key verification failed.

The Solution is very simple. Just rename your “.ssh” into “.ssh_old” by using “mv” command.

Ex:

$ mv .ssh .ssh_old

Or just go to “.ssh” directory, and  edit the file name called “known_hosts”. In this file contains, which you already connected machine’s with your’s, public ssh keys . Now just remove the public key which ip address giving trouble.

Ex:

[suresh@mercury ~]$ cd .ssh
[suresh@mercury .ssh]$ ls
known_hosts
[suresh@mercury .ssh]$ cat known_hosts
192.168.1.7 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFZ5W
Dc0VUPae3hL7oWJg35NftAb804U/75vGY5tcffI2+7EeKWAPLWcXQJa9
+TD1q8KhYJjjpgB7Nx3tgl1JCM1Eti6jSFJZwAJKDXWrJqxy/loFq05EM9va9v
QM6sNOpYu8jng8OBXv79s1HoBrtIMUm4ivvqB3yTevYJeTtUQsT/cZRbaelOzmeh
O68xixQ2csUfrNAH//8JfemzsJV9B57+Ln6z/oc61ChdrMWCpwOtsCRMmG2pQsJZ4
xdr1axxlTPKQwblLmnbGLcUKjB4B/RSyjUH3OPLn2nj5KHqrOnbWRyuR1ElR5/x
wHFdbOXn4tkMwRrms6iuQKCitxB
[suresh@mercury .ssh]$

That’s all.

How to Disable the “SELinux” on Fedora 14


Hi friends,

If you want disable the “SElinux” on your linux box, Just follow the simple commands. 🙂

Open your terminal and login as root user, now we have to edit the “SELinux’s”
main configuration file.

$ gedit /etc/selinux/config

you will see some lines like this:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

Now, just change SELINUX=enforcing to SELINUX=disabled, like

SELINUX=disabled

and you’re done. You have to Reboot the machine to disable the SELinux.

That’s all. 

 

SELINUX=disabled

Solution for “ssh: connect to host localhost port 22: Connection refused”


Hi friends,

Since three days, i had problem with my ssh connection. When i was tried to connect my laptop to others machine,  I’m able to connect with them. But when i tried to connect, others machine to my laptop, I got this Error.

[student@mercury ~]$ ssh suresh@192.168.1.9
ssh: connect to host 192.168.1.9 port 22: Connection refused

Solution for this “port 22: Connection refused” :

First check if sshd is running by trying the command ‘$ pgrep sshd
on the host. If the output is empty, its very likely that sshd is not
running. Try ‘tail -f /var/log/messages’ on one terminal and do
a ‘$ /etc/init.d/sshd start‘ on another terminal.  Then, check the
output that comes up on the previous terminal.

 

if PID comes, like 1702(any number), we conform the “sshd” is running.

Next, we have to flush the “iptables” by using the following command,

$ sudo iptables -F

That’s all. Now you can connect with anyone via ssh.

If again the same problem appear, Try ‘$ grep sshd /var/log/messages | tail‘ and
$ grep ssh /var/log/secure | tail‘ and check for any possible issues.

🙂

 

ssh connection: port 22 problem


Hi friends,

Since today morning also i tried to learn about to “set up a centralized git repository”. I got many good links about this. But when i tried to do the “ssh”, i faced many obstacles. Then, i posted a mail to the “ILUGC” mailing list.(http://www.ae.iitm.ac.in/pipermail/ilugc/2011-March/065064.html) I got many suggestions/answers like,

* Disable the SElinx
* Flush the iptables using “$ iptables -F”
* nmap 192.168.1.9
* netstat -ltnp | grep 22

But still, i can’t resolve my problem. 😦  i’ve to “set up the centralized git up repo” At least by tomo

Learning about “Centralized git repository”


Hi friends,
Today from morning i searched about creating centralized git repo” in goggle. Finally i got some links with example, in which i couldn’t understand some of them.

http://daniel-salazar.com/content/7/setting-up-sandboxes-that-use-a-central-git-repository

http://wiki.debian.org/Alioth/Git#Using_personal_Git_repositories

http://pthree.org/2008/11/28/setup-a-git-repository/

But when i tried workout those example, at some point of place i didn’t get the output/response
Tomo also have to study about this and i’ll create the repo.

Errors that i’ve got:
* Connection timed out
* fatal error port22 (But i can establish connection with the other system)

HTML5 “video” tag


Hi friends,

Today i learnt about HTML 5 “video” tag. This tag is new to HTML 5 🙂

About “video” tag:

The <video> tag specifies video, such as a movie clip or other video streams.

A Simple HTML5 video:

Here the simple html5 code for on-line video,

<!-- The simple is the HTML5 program. Here we were using the new
"video" tag.The program 'll run the video on the web browser.
Program Name: html5_video_tag.html
Date written: 25.03.11
Date Modified: 30.03.11
Author: Tha.Suresh
-->

<!DOCTYPE HTML>
<html>
<body>

<video width="320" height="240" controls="controls">
<source src="http://tinyvid.tv/file/1bjuyg6rp4q71.ogg" type="video/ogg" />

Your browser does not support the video tag.
</video>

</body>
</html>

Running Notes:

  • Any text inside the between <video> and </video> will be displayed in browsers that does not support the video element.
  • The “control” attribute is for adding play, pause, and volume controls.
  • Currently HTML5  supports  “ogg, mp4 and webm” formats only.

Various Browser Supports HTML5:

Format IE Firefox Opera Chrome Safari
Ogg No 3.5+ 10.5+ 5.0+ No
MPEG 4 9.0+ No No 5.0+ 3.0+
WebM No No 10.6+ 6.0+ No

Preview:

If you want fun just cop y the code and save as “html” file and open it your firefox browser. This video won’t run in IE and safari. Because its “ogg” format file. 😛

Preview of video running in browser via HTML5 Prog.,