Getting OS X Terminal to behave

Last time I didn’t write this down and this time I’m blogging about it so I don’t forget it. OSX Hints has a good guide on how to set to work the way God Intended (great command line user that He is).

I am handy around the, but for me the main thing that I kept forgetting (and hurts me a lot since my muscle memory depends on it) is moving forward and backwards full word:

"\e[5C": forward-word
"\e[5D": backward-word

By the way, have I mentioned I no longer have to use PCs? Woot!

Update: Here is another guide you may want to take a look at. And another

technorati tags:, ,

Editando código HTML en idiomas con marcas diacríticas

Manejando marcas diacríticas en HTML

Como muchas personas de habla hispana, muchas veces me veo en la necesidad de editar código
HTML en idiomas con marcas diacríticas (como el Español). Mi esquema de teclado soporta
marcas diacríticas, pero dejar estas marcas en el código fuente
del HTML es un problema porque a veces los navegadores (o los programas de
manejo de contenido) tienen un código de página distinto al que
se utilizó para leer el archivo originalmente, lo cual hace a las marcas
diacríticas verse espantosas. Y tener que recordar los códigos de cada
letra acentuada rompe el tren de pensamiento.

Este artículo ayuda a solucionar este problema mediante macros que convierten tus caracteres diacríticos a entidades HTML.

Continue reading “Editando código HTML en idiomas con marcas diacríticas”

Mac Tip: Avoiding .ds_store creation on your network drives

From this item at macosxhints – Prevent .ds_store creation across multiple user accounts

it turns out its fairly easy to configure an OS X client to apply the setting for any user who logs in.You just need to run this command…

defaults write DSDontWriteNetworkStores true

…under a single account, then copy the created plist to /Library/Prefrences.

The article also has other ways of going about this, including vetoing files on the samba share directly (clever!)

Using Jobs API and asyncExec

Using the Jobs API (Job and IProgressMonitor) you can implement code that will run in a thread and update the standard Eclipse progress monitoring service as you go along in your thread.

To create a job, extend from org.eclipse.core.runtime.Job and implement the run method:

protected IStatus run(IProgressMonitor monitor) {
  int steps = 100000;
  monitor.beginTask("My Task", steps);
  for ( int i=0; i

To activate the job in MyClass (say it's a page with a tableViewer which we use to set the input), you do the following:

MySampleJob myJob = new MySampleJob();
myJob .addJobChangeListener(new JobChangeAdapter() {
  public void done(IJobChangeEvent event) {
    Display.getDefault().asyncExec(new Runnable() {
      public void run() {
                        setInput(myJob .getInputForTableViewer());

Have fun!

Oracle tuning: Using Hints

Every once in a while you will get a query that no matter what you try, it doesn’t use the indices. This is typically because the cost-based optimizer decides that an approach that is slower has a total cost that is lower than using the index and making it faster.

To solve this, you would use a hint. You can find an article on how to do this on dbasupport. But the basics are: Continue reading “Oracle tuning: Using Hints”