Thursday, September 29, 2011

Tip: How to type ñ in a Mac

If you’re composing an invitation to a piñata party and you’re wondering how to type that ñ, here’s how:


Press and hold Option
option.png
…while pressing n
n.png
…then release and press n again, alone…
n-alone.png
…to type this:
tilde.png
Also:
Option + E, then E again → é
Option + U, then E → ë
Option + C → ç

Thursday, September 15, 2011

No application context active with JBoss Seam

When I was implementing an ASYNC call to a JBPM process using my RESTEasy (seam) component, I was having a really hard time, because each time I made a SYNC request, I got a successful response from my JBPM process (where I use some Seam Components) but when I switched to an ASYNC call by using Threads

I always got

Then I found a really dirty workaround, before making any call like this one
Make sure that the Context is Active (On my case I did it on a method that I wrote to retrieve Seam Components on an abstract parent class for all my Handlers: ActivityBehaviour or DecisionHandler)
By doing this you'll bypass that issue, I still need to verify if it doesn't impact the performance of my process or if there is any other way.


FYI: This is my RESTEasy Component :)

Tuesday, September 13, 2011

Show non-printable characters in VI

You just KNOW there's a stray tab or other character in this file, right? So how can you display these characters in vi?

[ESC] to get into command mode
:set list

Look through the file. Tabs will be ^I, DOS-style end-of-lines will be ^M, etc.

To go back:
[ESC] to get into command mode
:set nolist

Sunday, September 4, 2011

How to do print screen in Mac OS X

Yesterday, I wanted to do a print screen in Mac OS X but there is not print screen button in Mac keyboard o_O
There are few ways to do screen capture in Mac OS X.
Follow the steps below and you will be able to do a screen capture in Mac OS X.
  • Hold down Apple key ⌘ + Shift + 3 and release all keys
  • Hold down Apple key ⌘ + Shift + 4 and release all keys

My favorite is the second option, the result will be on your desktop a new Image File :D