Broadcast your shell thru port 5000

2010-11-20 1 min read Bash Fedora Linux

Broadcast your shell thru port 5000

  <td>
    <div class="text codecolorer">
      mkfifo /tmp/fifo;(nc -q0 -l 5000 < /tmp/fifo &);script -f /tmp/fifo
    </div>
  </td>
</tr>
1

run

  <td>
    <div class="text codecolorer">
      nc yourip 5000
    </div>
  </td>
</tr>
1

elsewhere will produce an exact same mirror of your shell. This is handy when you want to show someone else some amazing stuff in your shell without giving them control over it.

Continue reading

Screen enable/disable logging in all windows

2010-11-19 1 min read Bash Learning Linux

If you use screen command a lot then this is something that you will like 🙂

Screen enable/disable loggin in all windows

  <td>
    <div class="text codecolorer">
      bindkey ^l at "#" log on<br /> <br /> bindkey ^o at "#" log off
    </div>
  </td>
</tr>
1
2
3

The command when added in screenrc enables logging all open windows by using the C-l (control-l key combination) and disable by C-o . The lines need to be added in separate lines .

Continue reading

Browser Conkeror – fast, versatile, easy and configurable

2010-10-20 2 min read Linux

Conkeror is a browser that uses XULRunner and is a highly configurable and programmable browser.

Here is the description of the browser from the homepage:

Conkeror is a keyboard-oriented, highly-customizable, highly-extensible web browser based on Mozilla XULRunner, written mainly in JavaScript, and inspired by exceptional software such as Emacs and vi. Conkeror features a sophisticated keyboard system, allowing users to run commands and interact with content in powerful and novel ways. It is self-documenting, featuring a powerful interactive help system.

Continue reading

bash script to run a command and take screenshot in every loop.

2010-09-24 2 min read Bash Fedora Learning Linux

Couple of days back, I had posted a command to display a stop timer with bash and echo. There I had also put the following gif file:

<img class="size-medium wp-image-2555" title="bash screenshot for the script output" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/09/temp-300x170.gif" alt="bash screenshot for the script output" width="300" height="170" />

Here the tricky part was to capture the jpg&#8217;s to create the gif file.

Preparation:

  1. Rename the terminal to aka – amit-capture

  2. Execute the command once with the import command and check the output and jpg&#8217;s

    Continue reading

cURL – Tutorial

2010-09-15 1 min read Bash Fedora Linux

Here are linkw to two nice tutorials on curl and how to use curl to login before we try to fetch a page. Hope you find them useful.
http://curl.haxx.se/docs/httpscripting.html

http://www.youtube.com/watch?v=XcgQUsorF_8

http://scriptasy.com/php_11/tutorial-curl-login_44.html

Enhanced by Zemanta

Use the last command\’s output as input to a command without piping and bind to it to a key sequence in bash.

2010-09-01 1 min read Fedora Linux Uncategorized

Use the last command&#8217;s output as input to a command without piping and
bind to it to a key sequence in <a class="zem_slink" title="Bash (Unix shell)" rel="homepage" href="http://tiswww.case.edu/php/chet/bash/bashtop.html">bash.

  <td>
    <div class="bash codecolorer">
      &nbsp;<span class="kw3">bind</span> <span class="co3">\'</span><span class="st0">"\\C-h"</span>: <span class="st0">"\\<span class="es5">`fc\\ \\-s\\`</span>"</span><span class="co3">\'</span>
    </div>
  </td>
</tr>
1

My comment : fc is the fix command of the bash builtin.
This is similar to using `!!` or

Continue reading

Typing the current date automaticly in any application with a key binding.

2010-07-20 1 min read Linux

$ xvkbd -xsendevent -text $(date +%Y%m%d) I don&#8217;t want to waste time to all the time type the current date. I have set this snippet in my kde shortcuts with meta+l. All the <a class="zem_slink freebase/en/window_manager" title="Window manager" rel="wikipedia" href="http://en.wikipedia.org/wiki/Window_manager">window managers have <a class="zem_slink freebase/en/keyboard_shortcut" title="Keyboard shortcut" rel="wikipedia" href="http://en.wikipedia.org/wiki/Keyboard_shortcut">key-bindings AFAIK. That works in all softs, <a class="zem_slink freebase/en/command_line_interface" title="Command-line interface" rel="wikipedia" href="http://en.wikipedia.org/wiki/Command-line_interface">CLI or <a class="zem_slink freebase/en/graphical_user_interface" title="Graphical user interface" rel="wikipedia" href="http://en.wikipedia.org/wiki/Graphical_user_interface">GUI…

Continue reading
Older posts Newer posts