Wednesday, November 7, 2012

Mutt: Viewing URL On Your Favorite Browser

On this past few weeks, I've been back using mutt. And this time, with much advanced configuration. One of its configuration is opening URL inside emails on your favorite browser. The requirement is simply using urlview that you can download from here (I'm using version 0.9), extract and compile it. Then add this config to your .muttrc file:
macro index \cu |urlview\n      # simulate the old browse-url function                                                                                                           
macro pager \cu |urlview\n
Also, you need to add ~/.urlview and put this line:
REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]
COMMAND <your-browser> %s

After all done, try to open one email in your mutt. Then in view mode, press ctrl-u and urlview will listing all available URL inside that email. You just have to choose one and press Enter, and your browser will automatically open and load that URL.

Wednesday, June 6, 2012

How to open .uif file in Ubuntu Linux

Here's how to open .uif file in Ubuntu Linux:
1. Install uif2iso package
$ sudo apt-get install uif2iso
2. Run command to convert .uif to .iso file
$ uif2iso file.uif file.iso
3. Mount .iso file
$ mkdir ~/iso_file
$ sudo mount file.iso ~/iso_file -t iso9660 -o loop
That's it! :)

Friday, May 18, 2012

Failed Installing Java on Ubuntu 12.04? Here Are The Workaround

If you happen to experience the same flaw to installing Java on Ubuntu 12.04, then you could do these steps:

sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Proven to be worked well :) Credit goes to the Ubuntu Forum thread here

Tuesday, April 17, 2012

Want to access Simplenote from Vim? Use Vimplenote!

If you're the person who always logging anything like I do, probably you should try Simplenote , "easy way to keep notes, lists, ideas, and more" -- that's what they say in their website :)

For me, the ubiquity to using their service in many platform is their advantage. As a vim user, fortunately there are already many plugins to support my need in using Simplenote service, and one of them is Vimplenote

One reason for choosing Vimplenote than another plugins is because it's the easiest one to configure. I also using Vundle, Vim package manager to install and manage my vim plugins.

Enough said, just follow my steps to do it:
1. I prefer clean install, so move your ~/.vim and archive it
$ mv ~/.vim ~/.vim-bk
2. Create new ~/.vim and ~/.vim/bundle (to contain your plugins)
$ mkdir -p ~/.vim/bundle
3. Setup Vundle
$ git clone ~/.vim/bundle/vundle
4. Configuring .vimrc
 set nocompatible               " be iMproved
 filetype off                   " required!

 set rtp+=~/.vim/bundle/vundle/
 call vundle#rc()

 " let Vundle manage Vundle
 " required! 
 Bundle 'gmarik/vundle'

 " My Bundles here:
 " original repos on github
Bundle 'mattn/vimplenote'
Bundle 'mattn/webapi'
 " ...

 filetype plugin indent on     " required! 
 " Brief help
 " :BundleList          - list configured bundles
 " :BundleInstall(!)    - install(update) bundles
 " :BundleSearch(!) foo - search(or refresh cache first) for foo
 " :BundleClean(!)      - confirm(or auto-approve) removal of unused bundles
 " see :h vundle for more details or wiki for FAQ
 " NOTE: comments after Bundle command are not allowed.. 
5.  Get webapi-vim and vimplenote-vim
$ git clone git:// ~/.vim/bundle/webapi
$ git clone git:// ~/.vim/bundle/vimplenote
6. Running and installing bundle
$ vim
7. Using Vimplenote (do it inside vim)
:Vimplenote -l     " list of your Simplenote notes (you'll be prompted to fill in login credentials)
:Vimplenote -d    " delete your current note
:Vimplenote -n    " create new note
:Vimplenote -u    " update current note
:Vimplenote -t     " add a tag to a note
:Vimplenote -s    " search a note
And you're good to go :)

You can also see the README file in every plugin page to see additional info.