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 https://github.com/gmarik/vundle.git ~/.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://github.com/mattn/webapi-vim.git ~/.vim/bundle/webapi
$ git clone git://github.com/mattn/vimplenote-vim.git ~/.vim/bundle/vimplenote
6. Running and installing bundle
$ vim
:BundleInstall
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.

Thursday, December 29, 2011

Virtual Keyboard on #Pre2 #webOS

Testing this on my Pre2 running #webOS 2.2.4 and works fine, so far :)

See the forum thread here, check out the #1 post, then follow the detail steps below:
1. Download luna.conf.patch for webOS 2.x from Arthur Thornton (on that #1 post)
3. Download VKB-1.1.4.zip (also on that #1 post, depending on your webOS version)
4. Install luna.conf.patch to your Pre 2 using webOS Quick Install



5. Unzip VKB-1.1.4.zip, you've got VKB.sh and send that file to your Pre 2 (e.g to /media/internal)



6. Accessing linux in your Pre 2 using webOS Quick Install or novaterm through Windows Command Prompt / Linux Terminal
7. Go to /media/internal directory: # cd /media/internal
8. Run this command: # VKB.sh -patch
9. Your Pre 2 will boot automatically
10. You've got the Virtual Keyboard by swiping up from gesture area

Tuesday, December 27, 2011

Live Partitioning HP TouchPad #webos

You can see the source of this blogpost here. I just re-write on my blogpost according to my own experience, trials and errors :)

I assume that you already have all requirement to connect to your TouchPad (Palm SDK, Linux Access, etc.)

Here's what you have to do:
1. Check the actual space used by /media/internal, write down or take screenshot
# df -h | grep internal

 2. Disconnect cryptofs
# pkill -SIGUSR1 cryptofs
3. Unmount /media/internal
# umount /media/internal
4. Verifying you have clean filesystem, before resizing (in my case, there are differences between boot sector and its backup, but I just choose 'no action' )
# /usr/sbin/fsck.vfat /dev/mapper/store-media
5. Verify how much space used by /media/internal
# lvscan | grep media

6. Decide and take space allocated for ext3fs partition (I took 2GB ext3fs partition for DebianChroot, so I resize /dev/mapper/store-media became 10.64G, from 12.64G)
# resizefat /dev/mapper/store-media 10.64G

7. # lvresize -L 10.64G /dev/mapper/store-media

8. Use free 2G partition to make ext3fs partition
# lvcreate -l 100%FREE -n ext3fs store
9. Format the partition with ext3 filesystem
# mkfs.ext3 /dev/mapper/store-ext3fs
10. Make the filesystem writable
# mount -o remount,rw /
11. Make mount directory
# mkdir /media/ext3fs
12. Add a line in /etc/fstab to automount ext3fs partition on boot up
# echo "/dev/mapper/store-ext3fs /media/ext3fs auto noatime 0 0" >> /etc/fstab
13. Make the filesystem back to read-only
# mount -o remount,ro /
14. Reboot
# reboot

That's it! And I'm pretty sure that you can apply this to any webOS devices :)