Search This Blog

13 March, 2012

copying file using scp linux

scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.

1) Copying file using scp to remote host
 scp file1.txt <username>@<domain_name>:www/file1.txt
this will ask for password, enter
it password and then file transfer will happen

2) Copying  file using scp from remote host
scp  <username>@<domain_name>:www/file1.txt  /local/file/path

3) Copying  folder using scp from remote host
scp -r <username>@<domain_name>:www/folder_name .

29 February, 2012

adding/inserting comment in Aptana studio 3

For inserting comment in Aptana Studio 3 check the menu Commands > Source > Comments. as seen below attached screencapture

Ctrl - /      to add/remove // for a single line of code, or for multiple selected lines.
Ctrl-shift-/ to add /* */ around selected code or inserting block comment
Ctrl-Shift-B  insert comment banner



26 February, 2012

diff, excluding files and directories

For excluding files and directories  while using diff, we can pass the exclude pattern in the command line.

Say for you  u want to exclude the below file and folders
config.txt
log.txt
logs -> Folder/Directory
error_log
uploads -> Folder/Directory

diff -Nru  -x 'config.txt' -x 'log.txt' -x 'logs' -x 'error_log' -x 'uploads' <folder-old> <fodler-new>



25 February, 2012

WiFi Soft AP - Virtual AP-Virtual Router - Windows 7 for internet sharing like wireless hotspot

hello all want to turn your laptop to a WiFi hotpsot. you can call it like Software AP, Soft AP, Virtual Access Point(VAP), virtual router. From Windows 7 onwards we can turn the WiFi adapter in the laptop or PC to work like an Access Point. So after turning on this feature your laptop/PC will act as an WiFi Access Point so that laptop/PC with wifi adapter can connect to it for browsing or you can do normal PC connectivity for data sharing

For this we need to configure the settings using netsh using administrator privilege and enable the internet connection for the interface which u want to share.

Follow the below steps to achieve it

1) Select the  network interface properties , say if you want to share the data card , select as shown below
2) Go to the Sharing tab and in the Internet Connection Sharing

check the checkbox Allow other network users to connect through this computers Internet connection as shown in the below figure

3) Now open the command prompt in administrator privilege, For this you can right click on the command prompt in the start menu right click on it and press Run as administrator


4) Now in the command prompt type the below two commands
netsh wlan set hostednetwork mode=allow ssid=test key=password
netsh wlan start hostednetwork


You can see the output for the commands typed

After this, you laptop/PC is ready as an WiFi Access Point (AP), and others can connect to it for internet browsing or transferring data between the computers





17 January, 2012

Insert a New Row or Column - Excel Keyboard Shortcut

Hello all below is the method to insert a new row or column

For Inserting Rows 
  1. Shift+SpaceBar = Select the current row
  2. Ctrl+Shift+PlusSign = Insert row(s)


For Inserting Column
  1. Ctrl+SpaceBar = Select the current row
  2. Ctrl+Shift+PlusSign = Insert colum(s)

Hope this help others

14 November, 2011

XAMPP joomla error: Strict Standards: Accessing static property JCache::$_handler as non static

 i was getting the below error message in firefox after installing the Joomla 1.7.6 version with XAMPP

Strict Standards: Accessing static property JCache::$_handler as non static in E:\xampp\htdocs\joomla_176\libraries\joomla\cache\cache.php on line 422

 After googling,  i found the below recommendation to be done to solve this issue

  1. First check for php.ini file in your server folder (XAMPP), in that replace display_errors=false
  2. Change error_reporting = E_ALL | E_STRICT to error_reporting = E_ALL & ~E_NOTICE
  3. One more thing select the Server (XAMPP) application and right click-> and check for 'run always as administrator'

After doing the above points, its working fine...




16 September, 2011

linux search using grep and excluding .svn folder

to search in linux using grep and excluding the hidden directory of the svn folder

grep -nr <search string> * | grep - v svn

tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...