Make any command read line enabled (on *nix)

2010-11-25 1 min read Bash Fedora Linux

Make any command read line enabled (on *nix)

  <td>
    <div class="text codecolorer">
      rlwrap sqlite3 database.db
    </div>
  </td>
</tr>
1

Enable readline even if the command line application is not using it.

* View this command to comment, vote or add to favourites * View all commands by pykler

commandlinefu.com

by David Winterbottom (codeinthehole.com)

URL: http://feedproxy.google.com/~r/Command-line-fu/~3/mKEgYoyHCMA/make-any-command-read-line-enabled-on-nix

Enhanced by Zemanta

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

OpenID for non-SuperUsers

2010-09-07 2 min read Learning Uncategorized

Based on the results of my Unobtrusive <a class="zem_slink" title="OpenID Foundation" rel="homepage" href="http://openid.net">OpenID post, it is quite evident that there is a lot of partial <a class="zem_slink" title="Knowledge" rel="wikipedia" href="http://en.wikipedia.org/wiki/Knowledge">knowledge about OpenID out there. While my knowledge on the subject is far from complete, this post is my attempt to share what I have learned with others.

The target audience for the bulk of this post is people who are capable of adding autodiscovery links to their blog templates, may be able to install a small <a class="zem_slink" title="PHP" rel="homepage" href="http://www.php.net/">PHP script and/or know what a <a class="zem_slink" title="Hypertext Transfer Protocol" rel="wikipedia" href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">HTTP <a class="zem_slink" title="List of HTTP headers" rel="wikipedia" href="http://en.wikipedia.org/wiki/List_of_HTTP_headers">header is.

Continue reading

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

when you press f9 'paste' is on , press f9 again and 'paste' is off, and so forth (works in insert-mode and command-mode)

2010-08-02 1 min read Bash Linux

<a class="zem_slink" title="Vim (text editor)" rel="homepage" href="http://www.vim.org/">vim&#8217;s pastetoggle: when you press f9 &#8217;paste&#8217; is on , press f9 again and &#8217;paste&#8217; is off, and so forth (works in <a class="zem_slink" title="Insert key" rel="wikipedia" href="http://en.wikipedia.org/wiki/Insert_key">insert-mode and command-mode) $ nmap :set paste!:set paste? Sets as paste toggle, with visual confirmation of state

* View this command to comment, vote or add to favourites * View all commands by Vilemirth

commandlinefu.com

by David Winterbottom (codeinthehole.com)

Continue reading

Adding a sub-menu in the wordpress admin menu :)

2010-07-29 2 min read Wordpress

For the impatient ones, first the code:
(in wp-admin folder, open the file menu.php) and locate the code:

$submenu[&#8217;edit.php&#8217;][10]  = array( _x(&#8217;Add New&#8217;, &#8217;post&#8217;), &#8217;edit_posts&#8217;, &#8217;post-new.php&#8217; );

and add the below:

$submenu[&#8217;edit.php&#8217;][7]  = array( _x(&#8217;Pending&#8217;, &#8217;post&#8217;), &#8217;edit_posts&#8217;, &#8217;edit.php?post_status=pending&post_type=post&#8217; );

And now the explanation and why do you need this 🙂

Problem:

There is no direct mechanism to access the pending posts in WP admin. I generally post through email and mark them as pending. So, whenever I go to my admin POSTs page, I will look through the list of pending items and post them as and when required. For this, when I am done with changes in one item, I need to either modify the address bar or need to go to posts link and then click the Pending items.

Continue reading

PuTTY alternatives - AlternativeTo.net

2010-07-27 1 min read Uncategorized

I like PuTTY quite a bit but do not like the fact that it does not have any tab feature. So, if I am working on multiple machines then un-necessarily I will have too many windows open cluttering my desktop. So, here is the result of my quest to find the alternative:
<a href="http://alternativeto.net/desktop/putty/">http://alternativeto.net/desktop/putty/<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://blog.amit-agarwal.co.in/2010/06/05/putty-ssh-without-password/">PuTTY ssh without password (amit-agarwal.co.in) <li class="zemanta-article-ul-li"><a href="http://www.downloadsquad.com/2010/05/18/kitty-is-win32-native-putty/?zemanta-tracking">KiTTY is Win32-native PuTTY (downloadsquad.com) <li class="zemanta-article-ul-li"><a href="http://lifehacker.com/5541871/kitty-adds-session-saving-portability-and-more-to-putty">KiTTY Adds Session Saving, Portability, and More to PuTTY [Downloads] (lifehacker.com) <li class="zemanta-article-ul-li"><a href="http://blog.amit-agarwal.co.in/2010/04/11/putty-export-client-display-on-login-for-opening-x-application-and-terminal/">PuTTY export client display on login for opening X application and terminal. (amit-agarwal.co.in) <div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/zemified_e3.png" alt="Enhanced by Zemanta" /><span class="zem-script more-related pretty-attribution">

Continue reading
Older posts Newer posts