Monthly Archives: February 2012

Linux: enable history for user (howto)

Example: enable history for root user.
Edit ‘bash_profile’:

sudo vi /root/.bash_profile

And add the following two lines:

 HISTFILE='/root/.bash_hystory'
 export HISTFILE

Notes
.bash_profile is executed for login shells (via console, either sitting at the machine, or remotely via ssh).
.bashrc is executed for interactive non-login shells (ie: you’ve already logged into your machine and open a new terminal window inside Gnome or KDE)

Google Bookmarks – Firefox shortcut (no addon)

This is a small script you can use to place a special bookmark that will let you save current page in your google bookmarks.
No add-ons are required and it really easy to use.

  1. Create a new bookmark: Bookmarks > Show all bookmarks > Bookmarks menu > Organize > New bookmark
  2. Set “name” with something like “Google Bookmark”
  3. In the “location” field add the following code:
    javascript:(function(){var%20a=window,b=document,c=encodeURIComponent,d=a.open('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+c(b.location)+'&title='+c(b.title),'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=420px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();
  4. Done!

Everytime you need to save a google bookmark just click on the Bookmarks menu, select your special bookmark called “Google Bookmark” and enjoy!

Browsing a REST interface with Firefox and ModifyHeaders

Install ModifyHeaders for Firefox:
https://addons.mozilla.org/en-US/firefox/addon/modify-headers/

Then open config panel and add your custom headers to access the REST service.
A single header has a name and a value, so it’s something like:

 Name: X-Gallery-Request-Key
 Value: b333837c...

Add all the custom headers you need, then press “start”.
Now you can browse your REST url with firefox ;)

At last

And I am lost so lost
But you’re the constellations
That guide me