change the window in split screen.

2010-04-11 1 min read Firefox Linux Vim Tips

I use the split screen in vim very in-frequently, so I did not really know how to move from one screen to the other. There is also very little or no documentation that I found on this on the first page of google, so here it is :
press ”ctrl+w and ctrl + w” to change to other window.

If you are not sure how to get the split screen, then you can type help split in vim to get the help on split screen.

Continue reading

In (any) vi, add a keystroke to format the current paragraph.

2010-04-11 1 min read Linux

<a id="aptureLink_F2g9MXMw3t" href="http://en.wikipedia.org/wiki/Vi">vi editor is very powerful in the sense that you can use maps, abbreviations and recordings. One such example is when you are trying to write a email or trying to write a paragraph and you want to format it. You can create a mapping like so, in your .exrc or .vimrc and use it to format the paragraph.

map ^A !}fmt<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.slumpedoverkeyboarddead.com/2009/08/19/nano-text-editor-course/">Nano Text Editor Course (slumpedoverkeyboarddead.com) <div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/af58b127-c811-4fc3-bce6-9f44fcdc03c3/"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b22.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">

Continue reading

Firefox Tips

2010-04-11 1 min read Linux

<a href="http://blog.amit-agarwal.co.in/category/linux/">Bookmark this category
Firefox Tips Mozilla Firefox has been outperforming Internet Explorer for a number of years, and its latest version is even faster than ever. However, there is a new, lean, free web browser on the block which runs web pages at lightning speed. It goes by the name of Google Chrome. Google released the source code of Chrome, including its custom JavaScript engine as an open source project entitled Chromium.

Continue reading

Linux Shell Scripting Tutorial – A Beginner\’s handbook

2010-04-11 0 min read Bash Learning Linux
\"Tux,
Image via Wikipedia

<a class="zem_slink freebase/en/unix_shell" title="Unix shell" rel="wikipedia" href="http://en.wikipedia.org/wiki/Unix_shell">Linux Shell Scripting Tutorial – A Beginner&#8217;s handbook —

This book is for students and Linux System Administrators. It provides the skills to read, write, and debug <a title="Linux" href="http://bash.cyberciti.biz/guide/Linux">Linux <a class="zem_slink freebase/en/shell_script" title="Shell script" rel="wikipedia" href="http://en.wikipedia.org/wiki/Shell_script">shell scripts using <a title="Bash" href="http://bash.cyberciti.biz/guide/Bash">bash <a title="Shell" href="http://bash.cyberciti.biz/guide/Shell">shell. The book begins by describing <a title="Linux" href="http://bash.cyberciti.biz/guide/Linux">Linux and simple scripts to automate frequently executed commands and continues by describing conditional logic, <a class="zem_slink freebase/en/interactivity" title="Interactivity" rel="wikipedia" href="http://en.wikipedia.org/wiki/Interactivity">user interaction, loops, menus, traps, and functions. Finally, book covers various sys admin related scripts such as making a backup, using <a class="zem_slink freebase/guid/9202a8c04000641f80000000045c9c5b" title="Cron" rel="wikipedia" href="http://en.wikipedia.org/wiki/Cron">cron jobs, writing interactive tools, web based tools, remote login, ftp and database backup related scripts. This book is intended for Linux <a class="zem_slink freebase/en/system_administrator" title="System administrator" rel="wikipedia" href="http://en.wikipedia.org/wiki/System_administrator">system administrators or students who have mastered the basics of a Linux Operating System. You should be able to:

Continue reading

Another nice utility for blogging from within firefox.

2010-04-11 1 min read Linux

Scribfire is another nice utility for blogging withing firefox. Nice features and quick and easy to configure and use ..

Jokes – many to be downloaded once..

2010-04-11 1 min read Bash Fedora Linux

All work and no fun makes Jack dull boy. So lets do something for fun. Here is a one liner I wrote sometime back.  The original idea is not mine and I don&#8217;t remeber where I got the idea from but it was some other one liner that I was browsing for some oracle query. Anyway here&#8217;s the one liner to get lot of jokes in one file.

#!/bin/bash
for i in `echo 000{0..9} 00{10..99} 0{100..999} {1000..1600}` ; do links -dump http://www.robsjokes.com/$i/index.html | sed &#8217;/Random Joke/,/Next Joke/!d&#8217; | sed &#8217;/^$/,/^$/!d&#8217; » ~/Rob.jokes ; echo &#8217;%&#8217; » ~/Rob.jokes ;echo $i; done

Continue reading

core dump checking script.

2010-04-11 2 min read Bash Linux Solaris

I was testing a program which crashing every now and then. It is very difficult in such scenarios to keep looking for the <a class="zem_slink" title="Core dump" rel="wikipedia" href="http://en.wikipedia.org/wiki/Core_dump">core file or keep checking for the running process. So I wrote this simple script that can check for core file in the particular path and keep running until it finds one. You can hack this script to send a mail once the core is found. This is a very simple script. And this should work on solaris too..

Continue reading
Older posts Newer posts