Enter Bios Settings and Boot From CDROM With VMware Fusion

| Comments

Today I encountered some problems when I wanted to boot from a pmagic ISO (CDROM) with VMware Fusion: How do you enforce to enter BIOS settings on next boot?

There seems to be no option to do that from the GUI, but this web site helped me to get back on the track: http://raamdev.com/accessing-the-vmware-fusion-bios

For those settings you need to edit the .vmx file of your virtual machine directly.

  • Locate your virtual machine’s location (i.e. ~/Documents/Virtual\ Machines/WinXP/Windows XP Professional.vmwarevm)
  • Right click the .vmwarevm fiel and “show package content”
  • Open the .vmx file in a text editor (i.e. mate Windows XP Professional.vmx)
  • Add the setting bios.forceSetupOnce = “TRUE” at the end of the file

vmx-edit

bios.forceSetupOnce = “TRUE” helped to enter the BIOS settings at boot time but strange enough the boot order options settings within the BIOS where locked. I ended up adding the setting bios.bootOrder = “CDROM”, which sets the CDROM as the first boot option within the .vmx file.

 

 

Fixing Ruby Readline Errors on CentOS

| Comments

Error

The following errros may occure if readline is not properly configured on a system:

/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- readline (LoadError)

Fix

Here is the fix:

yum install readline-devel -y cd /usr/local/src/ruby-1.9.2-p136/ext/readline/ ruby extconf.rb make sudo make install

Showcase: Resume & Portfolio Application Using Sinatra

| Comments

Over the last few weeks a played around with the lightweight Ruby web framework Sinatra to build a resume and project-portfolio application.

The resulting application is still in a early stage but already serves it’s purpose. If you are interested you can check out the code on GitHub or take a look at my resume page.

At the moment the application has the following features:

  • support for resume, contact details and project-portfolio
  • multi language support (using r18n)
  • easy configuration over YAML files for data storage
  • edit your resumes using markdown (using rdiscount)
  • page caching (using rack-cache)

By the way, to get started with Sinatra I can recommend the excellent screencast from Peepcode.

RVM on OSX Snow Leopard & Readline Errors

| Comments

There seems to be an issue with the system readline utility which prevents Rubies installed by rvm from being compiled. One way of fixing the problem is to install your own version of readline.

Errors in the make log:

readline.c: In function ‘username_completion_proc_call’: readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function) readline.c:730: error: (Each undeclared identifier is reported only once readline.c:730: error: for each function it appears in.) make[1]: *** [readline.o] Error 1

Your own readline

Compile and install your own readline:

curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.1.tar.gz tar xzvf readline-6.1.tar.gz cd readline-6.1 ./configure --prefix=/usr/local make sudo make install cd ..

Give rvm another try …

First you have to remove Ruby versions you tried to compile before:

rvm remove 1.9.1

The following command with a reference to the newly installed newline should do the job:

rvm install 1.9.1 -C --with-readline-dir=/usr/local/

Reduce PDF File Size on OSX

| Comments

Some days ago I needed to reduce a PDF file to send it by e-mail, but the integrated Quartz-Filter “Reduce file size” which is available per default in all programs able to save as or export in the PDF format, was just not giving the results I expected: The file site was largely minimized but Image based pages where just from a very bad quality.

The trouble with the included “Reduce file size”-filter is that all pictures in the document are reduced to a size of 512x128 pixels which is often not sufficient for scanned documents.

After some research I found out that it’s possible to create your own Quartz-Filters which are afterwards available system wide.

Create your own “Reduce file size” -Quartz-Filter:

  1. open the ColorSync utility and choose “Filter”
  2. create a new filter by clicking the “+”
  3. add an action to the filter by clicking on the arrow on the right: first a “picture adaption” -filter to reduce the file size (I chose to reduce the size by 60%, but you can play around with that)
  4. add a second action to compress all images (I chose JPG and maximal compression)
  5. Voilà - your new filter is ready and available in the PDF-Viewer Preview

[gallery]

With my custom filter I was able to reduce the PDF file size from 4.8 to 1.2 MB and maintain good quality at the same time.