Skip to content

How to: SCP


Hi 🙂

TO Send a file or Directory using SCP

$ scp file_name remoteSysName@ip_address:/path_to_copy

Eg;

$ scp hello.txt suresh@192.198.7.5:/home/suresh/Desktop

If you want send a directory mean follow this

$ scp -r hello suresh@192.198.7.5:/home/suresh/Desktop

“-r” mean Recursively copy entire directories.

After run this commend it will ask the confirmation and destination password that mean remote system password.

Are you sure you want to continue connecting (yes/no)?

Give yes

suresh@192.168.1.9's password:

Give the remote system password

Then this will send the file to remote sysytem.

Ex:

yogesh@yogi-Inspiron:~/Desktop$ scp ATT356309.gif suresh@192.168.1.9:/home/suresh/Desktop
suresh@192.168.1.9's password:
ATT356309.gif                                 100%  540KB 539.6KB/s   00:00  
yogesh@yogi-Inspiron:~/Desktop$

Wireless Driver for Fedora


Hi 🙂

I struggle with my wireless driver then i found some information i share this here.

For Broadcom network controller, follow these steps to install it’s firmware

But before installing the firmware, we need b43-fwcutter, a software package that extracts the firmware. So, type the following as root user.

 $yum install b43-fwcutter

If you need to install version 4 firmware, run these commands.

 $wget http://downloads.openwrt.org/sources/broadcom-wl-4.150.10.5.tar.bz2
 $tar xjf broadcom-wl-4.150.10.5.tar.bz2
 $cd broadcom-wl-4.150.10.5/driver
 $b43-fwcutter -w /lib/firmware wl_apsta_mimo.o

Once it’s done, reboot the network manager, to make the wireless device up and running.

$service NetworkManager restart

Mouse over effect using JavaScript.


Hi 🙂

This is very simple code, keep  image file and the source code in a same directory. and run the code in your Internet browser. must save the source code with “.html” extension.

Program:


<html>
<body>
<img src="images/nature-photo2.png" name="yogesh"       // Image path
onMouseOver="document.images['yogesh'].src='images/nature-photo.png'"    // Image path when mouse over
onMouseOut="document.images['yogesh'].src='images/nature-photo1.png'" width="350" hieght="150" />    // Image path when mouse out
</body>
</html>

Toggle effect using Jquery with CSS


Hi 🙂

Jquery Toggle

Yesterday i was created “login” form for my project using jquery.

I used jquery slideToggle effect for this.

I share this code here and if u want to run this code u should download jquery file and keep the downloaded jquery file and this source code in a same directory.

Save the source code file in “.html” extension.

Download Jquery: https://www.yousendit.com/download/ eURETkFzcklOMUJFQlE9PQ

Program:


<html>
 <head>
 <script type="text/javascript" src="jquery.js"></script>
 <script type="text/javascript">
 $(document).ready(function(){
 $(".flip").click(function(){
 $(".panel").slideToggle("slow");
 });
 });
 </script>
 <style type="text/css">
 div.panel,p.flip
 {
 margin:10px;
 padding:5px;
 text-align:left;
 background:#C6DB82;
 border:solid 1px #6ACC4A;
 width:50px
 }
 .space
 {
 height:10px;
 }
 #account
 {
 text-align:center;
 }
 div.panel
 {
 padding:10px;
 height:180px;
 display:none;
 width:400px;
 }
 </style>
</head>
 <body>
 <div class="panel">
 <lable>Username:<input type="text"></input></lable></br>
 <div class="space"></div>
 <lable>password :<input type="password"></input></lable></br>
 <div class="space"></div>
 <lable>Keep me logged in:<input type="checkbox"></input></lable>
 <div class="space"></div>
 <lable>forgot your password?<a href="">Click here</a></lable>
 <div class="space"></div>
 <hr>
 <div class="space"></div>
 <div id="account"><lable>Don't have a account?<a href="">Create account</a></lable></div>
 </div>
 <p class="flip">login</p>
 </body>
</html>

Output:

Cucumber for Rails


Hi 🙂

Actually cucumber is used for creating test case.

Today i installed cucumber in my system using this commend.

$sudo gem install cucumber

I have learn how to use this test case in rails from in this site.
But this video tutorial they used rails 2.6. So they have use the commend for initials the cucumber.

 ./script/generate cucumber

But i can not use this commend in Rails 3.

My first Rails_application


Hi 🙂

I started with Rails, continue learning the Fourth screencast of Ruby on Rails Tutorial by Michael Hartl. I finished 3rd screencast started forth one. i was struggle in 3rd screencast, still i dint recover from autotest. and tried to create about page but continuously i got error message called “Missing template” after that again i started from first then i got clear output and i pushed it in github. I Tried it in heroku also that was nice.

Intersection, Union and Difference operators in Ruby


Hi 🙂

Proud to say I completed 50 post 🙂 This is my  51th 🙂

How to use Intersection,Difference and  Union  operators in Ruby?

This is the Intersection,Difference and  Union  operators symbol’s.

Union => ” | ”

Intersection => ” & ”

Difference => ” – ”

For example:

fruits = "Apple", "Orange", "Banana", "Mango" #assigning some values to a variable.
snakes = "Samosa", "piza", "puff", "Chips"  #assigning some values to a variable.

union= fruits | snakes  # Union operation
=>["Apple", "Orange", "Banana", "Mango", "Samosa", "piza", "puff", "Chips"]  #Output.

Intersection = fruits & snakes   # Intersection operation
=>[]   #Output.

Difference = fruits - snakes  #Difference operation.
=>["Apple", "Orange", "Banana", "Mango"]  #Output.

Difference = snakes - fruits  #Difference operation.
 =>["Samosa", "piza", "puff", "Chips"]   #Output.

ASCIIquarium for Ubuntu


Hi:)

Ubuntu Fun With Terminal:

Asciiquarium for ubuntu

If you to  make your terminal more fun mean  follow this things..

This art created using perl.

Install Term::Animation

First, you need to install Perl module called Term-Animation. Open a command-line terminal (select Applications > Accessories > Terminal), and then type:

 $ sudo apt-get install libcurses-perl
 $ cd /tmp $ wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz
 $ tar -zxvf Term-Animation-2.4.tar.gz
 $ cd Term-Animation-2.4/
 $ perl Makefile.PL &&  make &&   make test
 $ sudo make install

Download and Install ASCIIQuarium

While still at bash prompt, type:

 $ cd /tmp
 $ wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz
 $ tar -zxvf asciiquarium.tar.gz
 $ cd asciiquarium_1.0/
 $ sudo cp asciiquarium /usr/local/bin
 $ sudo chmod 0755 /usr/local/bin/asciiquarium

How do I view my ASCII Aquarium?

Simply type the following command:
 $ /usr/local/bin/asciiquarium
OR
$ perl /usr/local/bin/asciiquarium

This slideshow requires JavaScript.

Ruby array


Hi:)

What is ruby array

A Ruby array is an object that contains a number of items. Those items can be variables (such as String,   Integer,   Fixnum   Hash   etc)   or even other   objects   (including   other   arrays   to   make   a multidimensional array). Once you have grouped all the items into the array you can then perform tasks like sorting the array items into alphabetical or numerical order, accessing and changing the value assigned to each array item, and passing the group of items as an argument to a Ruby function.

How to create array

You try this in Interactive ruby(irb) it easy for learning.

first_array = Array.new

This is a way of creating array. The “first_array” is a variable “Array.new” is we initialize a array.

after that just type in irb

first_array.empty?
=> true
first_array.full?
 => false

So now array is empty. now How  will initialize array size.

first_array = Array.new(5)
=> [nil, nil, nil, nil, nil]
first_array.size
=> 5

Now array size is initialize without values so all possession occupied with nil.

Now how will initialize the value.

first_array = Array.new(5, "Hello" )
=> ["Hello", "Hello", "Hello", "Hello", "Hello"]

Now all possessions occupied by “Hello”

Another option is to use the [] method of the Array class to specify the elements one by one:

first_array = Array[ "Mon", "Tues", "Wed", "Thu", "Fri", "Sat","Sun" ]
=> ["Mon", "Tues", "Wed", "Thu", "Fri", "Sat", "Sun"]
first_array = [ "Mon", "Tues", "Wed", "Thu", "Fri", "Sat","Sun" ]
=> ["Mon", "Tues", "Wed", "Thu", "Fri", "Sat", "Sun"]

Started learinging Python.


Hi:)

Form 19-2-2011 my sir started teaching python. He will take python class for every Sunday cost of 3500rs for 8sunday classes totally 40 hours duration for this course.

If anybody interest to join visit this link: Slashprog Technologies .

Second week:

I learn

  • Python variables
  • Data-types
  • Using if statement
  • Using for statement
  • The range() and xrange() functions
  • Using the while statement
  • Using break, continue and pass statements
  • Using the else clause
  • Handling exceptions using try..except block