Thursday, December 30, 2010

Reading PDFs & Jpegs In The Terminal

Everynow and then I need to look at a pdf in the console. To do this fb is used to create a framebuffer to get fb install fbida-fg package.

Tuesday, December 28, 2010

Eclipse Autocomplete

To get instant autocompletion in Eclipse goto Windows → Preferences Java Editor → Content Assist → Auto-Activation

Then set Auto-Activation to zero, or a number much smaller than the 200 ms delay.

Something Old

This was the first thing that I ever wrote that seemed to be any good to me.


Ponder, Command and Conquer

more signals at eleven
This is an object of type IOConciousStream

I am the invisible man
wandering the land of the ghosts
In triple darkness my cipher is manifest
without a living dharma would there be karma?
I create mad vibes for my tribe

While we ponder, and wander
about creation of our nation
Seeking ethereal simulation
by engaging in random procreation
can you have a sunflower sutra
without the creation of a latin sura?

I get high off seminal earth, the windy word and the cleansing fire.
While you and I verse we can deceive entropy and the hearse

This life is a trial on the truth forsooth none of can escape the noose
And while sipping on crushed grapes I contemplate
Ghandi the Askari sitting under Olumo,
dancing on Pluto and laughing at Profumo.

Well, I init call on PlanB which floats the function,
ActiveMeasures(int p*)
We issue a final call, a clarion to all or if you want
wear the grinning mask and engage in scheming tasks
but remember that the Ghostface Killer and Bobby Digital will overthrow your whole citadel

We close like Ibn Khaldun yelling koom fa ya koom
And voice cries out in the wilderness Iqra! Iqra! Before your doom Ahad laila Ahad !

I am the invisible man surrounded by ghosts and motes
I drop lyrics and rimes to hebephrenics
Integrate with surds and paralleize the new ontogeny

people instill fear in their progeny
due to their own mental dichotomies
we all commit crimes in chasing dimes
heed the word and weed your deeds


Thank you patient reader

Banji Trimegistus, Kassim Ibn Hammed

-------------------------------------------------------------------
Don’t make me get all iambic on your pentameter

Fixing Update-alternatives' No such file or directory Messages

I found out that if I get the message "failed to read link /usr/bin/: No such file or directory" removing and recreating the symlink helped.  Below are the steps that I followed, this was all by trial and error, reading the alternatives man page and looking at what people have posted on the web.
 

  1. When an error message in the form, failed to read link /usr/bin/: No such file or directory was sent by alternatives I would do an ls -l to see where the symlink was pointing. 
  2. Remove the symlink /usr/bin/ if it was pointing to /etc/alternatives.
  3. Create a new symlink in /usr/bin/ pointing to /usr/java/jdk1.6.0.21/bin/.
  4. Run /usr/sbin/update-alternatives –install /usr/bin/   $JAVA_HOME/bin/ $JAVA_ALTERNATIVE_PRIORITY 
  5. Do /usr/sbin/update-alternatives –auto

After I went through all the steps I did not get any complaints from Fedora and my Java seemed to be correct. 



Update

To see exactly where the ymlinks are pointing too use the ll command.  An example of its output is below.

$ ll /usr/bin/javasw
lrwxrwxrwx 1 root root 24 Dec 28 01:20 /usr/bin/javasw -> /etc/alternatives/javasw


Unfortunately running ll /usr/bin/jar gives a no such file or directory message.  Typing jar works but need to make sure its the right jar.  so that when I call on libraries they will be the right ones.

Monday, December 27, 2010

Beautiful photos

Come and see.

Configuring Alternative Packages in Fedora

In this world of multiple Javas and other packages, and Debian created the alternative system to make it easy to pick which implementation of of a package should be selected. Though the man page is helpful Chris Taylor's Wednesday Why gives a succinct explanation of why Fedora adopted this technology.

Most of the time to set up an alternative do the following command:

sudo alternatives --install

For example if I have jdk1.6.0_21 & jdk1.6.0_23 installed and I want to use the latter's compiler I would do,

sudo alternatives --verbose --install /usr/bin/javac javac /usr/java/jdk1.6.0_23/bin/javac 16023

That way if jdk1.60.21's files are untouched by the symlink /usr/bin/javac now points to /usr/java/jdk

From what I have read so far alternatives is a good way of managing symlinks on your system.

Wporta shows how to install and configure Java for a 64 bit system. I might write a bash script to automate this configuration if there is a need. Another good resource is here.

An Old Vim Buffer Trick

When switching between buffers I usually forget that instead of typing :nextbuffer I can simply do :b where is the number of the next buffer. Or even better yet;

<CTRL>-^ to switch to the next buffer

To open the buffer in a new window in a new window <CTRL>-w followed by <CTRL>-^

With all those short cuts why remap the keys as Gmikeus shows us. butin matters of workflow there is no disputation. I do like Gmikeus' article which contains a lot of cool info.

I still find it easier to type :b in command mode. Well if I ever forget again I will look at either the buffer FAQ or vtk.org's useful commands list.

Hopefully now that I've written this the vim short cuts will ne'er be forgot.