So I got a base64 text which I’m supposed to decode and I thought “Ok! Let me use `base64` binary on terminal and write a small script which I will run when I need to decode it”.. Wait, I need to drop this script in binary path so that I can use it as a command without absolute/relative path traverse when in middle of work.
So far so good.. but it struck me that my browsers are always open and get this text from a url. Why don’t I skip all this and do this on the browser… is it possible?
Let’s say my base64 code is ZmFjZWJvb2suY29tL2Rhcy5zcmlrcmlzaG5hDQp0d2l0dGVyLmNvbS9zcmlrcmlzaG5hZGFz
Open a tab and on url type
data:text/plain;base64,ZmFjZWJvb2suY29tL2Rhcy5zcmlrcmlzaG5hDQp0d2l0dGVyLmNvbS9zcmlrcmlzaG5hZGFz
Wolah! Done.
Think Different!
Read more on MIME types here - http://en.wikipedia.org/wiki/Internet_media_type
To continue thinking differently, you can use firefox smart bookmarks, javascript bookmarket or greasemonkey script.
If you want to try smart bookmark of firefox, the bookmark target would be “data:text/plain;base64,%s”, and in runtime you can supply the text to be decoded.
See below link as an example usage of smart bookmark.
http://iamnovice.blogspot.com/2009/07/access-text-only-google-cache-for-any.html
Comment by manish — April 6, 2012 @ 10:58 am
Expected a good comment from my geek friend and here it is
Comment by krish — April 8, 2012 @ 9:52 pm