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$
Advertisements

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.