Saturday, March 23, 2013

Turn Vim Into WriteRoom

You know that WriteRoom is a software that is made to help you write distraction free. But the thing is that it only exists for Mac, which is not my world really.
I use Vim for writing instead :) and I've managed to tweak it and fashion it so I've got all I need for writing.
The only feature I haven't got yes it's full screen mode, I know there is a plugin for it but I haven't make it work under Windows yet.

Well, the first thing is to install Vim, that you can download from: http://www.vim.org/download.php once you've got Vim you need the vimroom plugin installed.

Vimroom will make the text centered, like having a left margin and a right margin to make reading and writing easy on your eyes.

So download Vimroom from: http://www.vim.org/scripts/script.php?script_id=3766
To install the plugin is really easy, just copy the vimroom.vim file under the plugin folder of your Vim installation.

Then to make vimroom work open your vimrc file to set up configuration and add these lines:

" vimroom configuration
set nonumber                      " No line numbering
set foldcolumn=4                  " Add a left margin
highlight! link FoldColumn Normal " Make it the background colour
set wrapmargin=8                  " Add a right margin, sort of



Well, here is the look of it:





I've also added a few lines to get green text on a dark backgound (easy on your eyes too):

" Set nice colors
highlight Normal guifg=#00ff00
highlight Normal guibg=#000000

" cursor magenta
hi Cursor    guibg=magenta gui=none



If you'd like to have another foreground color, let's say golden, just replace #00ff00 by #d0a000 and that's it.
As an extra, I've also got spelling checker, in this case is Spanish, which works quite well and consolas font:

" font
set guifont=Consolas:h12:cDEFAULT

" Spanish spell checker
:setlocal spell spelllang=es

Wednesday, March 20, 2013

Blogger H1 Tag on Post Pages Only

All Blogger templates uses the H2 or H3 as header tags, but for a better SEO is best to use the H1 tag only ONCE in every post page.

The problem is that if you change the H2 tag into the H1 in a blogger template, then you've got the home page that lists your latest posts with multiple H1 tags.

So here is how to solve this:

  • Click on: Template -> Edit HTML
  • Check: Expand Widget Template
  • Copy everything into a file to make a backup.

Then find this block of code:

 <b:if cond='data:post.title'>
      <h3 class='post-title entry-title'>
      <b:if cond='data:post.link'>
        <a expr:href='data:post.link'><data:post.title/></a>
      <b:else/>
        <b:if cond='data:post.url'>
          <b:if cond='data:blog.url != data:post.url'>
            <a expr:href='data:post.url'><data:post.title/></a>
          <b:else/>
            <data:post.title/>
          </b:if>
        <b:else/>
          <data:post.title/>
        </b:if>
      </b:if>
      </h3>
    </b:if>


In your template H3 can be H2, then replace the above code by this one:

<b:if cond='data:post.title'>
            <b:if cond='data:blog.pageType != "item"'>
                <b:if cond='data:blog.pageType != "static_page"'>
                    <h2><a expr:href='data:post.url' rel='bookmark' title='Permanent Link' expr:id='data:post.id'><data:post.title/></a></h2>
                <b:else/>
                    <h1><a expr:href='data:post.url' rel='bookmark' title='Permanent Link' expr:id='data:post.id'><data:post.title/></a></h1>
                </b:if>
            <b:else/>
                <h1><a expr:href='data:post.url' rel='bookmark' title='Permanent Link' expr:id='data:post.id'><data:post.title/></a></h1>
            </b:if>
        <b:else/>
            <h2><a expr:href='data:post.url' rel='bookmark' title='Permanent Link' expr:id='data:post.id'>UNTITLED ENTRY</a></h2>
  </b:if>


 This way the H1 tag will be displayed once on posts pages and static pages only, the rest will display the H2 tag. It is checking that the current page is neither an item page (post) or a static page (a page), that's how it works.

This is true if your blog title is an image or logo and not an H1, otherwise you'll get tww H1 tags.
Well I'm going to change my blog title by a logo image header.



Saturday, March 16, 2013

Turn Your HTC Desire S into a Microscope

You can turn your HTC Desire S into a microscope with a drop of water and it works!

I just woke up today with the idea: hey! what if I turn my HTC into a microscope?. So I just put a tiny drop of water on the camera lens using a dropper I made sure that the water drop was right in the middle of the camera's lens because the drop is smaller than the lens.
Also if the drop is too big it falls down when you turn the phone, so patience.
Once I got the water's drop right size and turn my phone I took these pictures:

My hand:
HTC Desire S Microscope my hand's skin detail
My hand's skin detail
And here is an image of one of my hairs:
HTC Desire S Microscope picture one hair
One hair under the HTC microscope
A part of a little flower:
HTC Desire S Microscope a small flower leave
A small flower microscope size
The same little flower before the microscope transformation:
HTC Desire S Microscope small flower in normal size
The same small flower in normal size

The hardest part was trying to hold the phone still because the slightest movement produced flurry pictures and the water drop moved too!
I've heard of small ball lens which are very cheap (under $10) that you can attach to the camera lens to get the same effect, I will let you know how it works if I can get one.
Well, for now it is fantastic with water and absolutely free.

What do you think? Will you try?
if so, remember: just a tiny drop otherwise you can damage your HTC. I think it may work with other smarthphones too, just try.


Friday, March 15, 2013

Root HTC Wildfire S with Wildfire Toolkit

If you've got an HTC Wildfire S you can root it with the HTC Wildfire S Toolkit that you can download form XDA developers forum.

There are many new tools for newbees to root your smartphone in one click, which you can do with Wildfire S Toolkit, well in fact it takes a few clicks but you can do it all from the Toolkit itself.

In order to root the HTC Wildfire S you need to unlock the bootloader and then flash a recovery.

As always, do this at your own risk as you are only responsible for any damage you do to your phone, and besides that you may loose the warranty.

So, before you start:
  •     Enable USB de-bugging mode on your phone settings and uninstall HTC Sync Tool if installed
  •     Close all active applications
  •     Disable antivirus
Unlock Bootloader HTC Wildfire S from HTCDev



By following these steps you can root the HTC Wildfire S, install drivers and lock and unlock the bootloader:


Step 1. Download the toolkit from http://d-h.st/users/hasoon2000/?fld_id=2808 and extract it to your computer (it only works on PC, not Linux or Mac).

Step 2. Download HTC drivers from http://binary100100.googlecode.com/files/HTCDriver3.0.0.007.exe to your computer and install them.

Step 3. Conect the phone to the computer and wait or the connection to be established.

Step 4. Launch HTC Wildfire S toolkit.
HTC Wildfire S toolkit


So you will have to:
  1. Install HTC Drivers
  2. Register at HTC Developers (use the button from the toolkit)
  3. Get the token ID (Unlock_code.bin file that you get by email from the HTC dev site)
  4. Submit the token ID (Submit the Unlock_code.bin file you've got from the HTC dev site)
  5. Unlock the bootloader
  6. Install recovery mode (there are GSM and CDMA versions, you must choose the correct one )

Up to here your phone is rooted, the rest of features are optional, to use if you want to flash



Reference: http://forum.xda-developers.com/showthread.php?t=1809751by