IPMIView on a current Mac OS (10.13.4)

Yes, I know… Nobody does use IPMI any more… There are so many better solutions.

And yes: You are like me: You are stuck to IPMI due to various reasons but do not want to install a Windows VM for this crap?

Here’s my solution (you need to know how to use the Terminal.app):

  • Download IPMIView for Linux from SuperMicro (yeah, Google’s your friend… Thomas Krenn actually also provides a download link
  • Unzip/Tar it to a folder of your choice (IPMI_TAR_DIRECTORY)
  • brew install jenv (you have HomeBrew installed, don’t you?)
  • mkdir -p ~/.jenv/versions (I have no idea why the homebrew script doesn’t do this, but…
  • echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc
  • echo 'eval "$(jenv init -)"' >> ~/.zshrc (change both accordingly if you make use of bash. See jenv-Website for details)
  • brew tap caskroom/versions; brew install java6
  • open a new terminal window, to get the jenv-environment in place
  • jenv add /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
  • jenv local 1.6 (that’s now part of your IPMI-Dir)
  • cd ..; cd - (just to re-enter the directory)
  • java -jar IPMIView20.jar
  • have fun!

I have also installed an Automator-script (just a new workflow that performs a shell script) and saved it as an application. I moved this application into my Dock and now I’m happy.
If you also want to change Automator’s script icon, I recommend the small app Image2Icon (Mac App Store).

Color temperature switching on a MacBook Pro (2011) while switching graphics engine

I recently ran into the problem that my MacBook Pro (early 2011) dramatically changed the color temperature on the LCD while it changes the graphics engine from “integrated” to “discrete” (I use gfxCardStatus to make this visible).
SMC reset, NVRAM/PRAM reset (see Apple for details) did not help at all, although “Google” reported that this should help.

What actually did the trick: I had plugged in another monitor using a Thunderbolt/Displayport to DVI adapter and I assume that I switched off the MacBook in an obscure way. So I just replugged this monitor (interesting fact: It did only work again after a Windows ™ like reboot), rebooted (see before) and unplugged it again.
Now everything is working as it should …

Things you shouldn’t expect working with a Mac!

Rails Own Logger

I was in need of a logging mechanism that prints all log messages with a “severity” that equals or is higher of “INFO” to STDOUT (I’m using multilog for actual logging stuff).

As I wasn’t able to google a solution I came up with the following (not quite elaborated) code:


class OwnLogger < Logger

    include Severity

    def add(severity, message = nil, progname = nil, &block)
      time = Time.now
        if severity >= INFO
          msg = "#{$$}:#{SEV_LABEL[severity]}:" + time.strftime("%Y-%m-%dT%H:%M:%S.") << "%06d " % time.usec + ":"
          if message.nil?
            if block_given?
              message = yield
              message = progname
              progname = @progname

            msg += message.to_s
            puts msg


So if you put the following lines in your /config/application.rb you’ll get what I got 🙂
config.logger = OwnLogger.new(File.dirname(__FILE__) + "/../log/#{ENV['PROCNAME']}#{Rails.env}.log")

AND (most important) you’ll still have the “normal” logfile containing all messages

Schuhmacherei Janisch

Schamlose Werbung 🙂

Wenn Ihr liebgewordene Schuhe mal nicht wegwerfen sondern lieber reparieren lassen wollt und zufällig in der Nähe von Solingen seid, dann besucht doch mal die Familie Janisch.

Die erledigen das dann für Euch…

Details unter Schuhmacherei-Janisch.de

Klare Empfehlung von mir!

Get the ID value of a serial column after insertation

Just took me 2 hours of Googling…

I found:

[…]The value of the last SERIAL insert is stored in the SQLCA record, as the second entry in the sqlerrd array. Brian’s answer is correct for ESQL/C, but you haven’t mentioned what language you’re using.
If you’re writing a stored procedure, the value can be found thus:
LET new_id = DBINFO(‚sqlca.sqlerrd1‘);
It can also be found in $sth->{ix_sqlerrd}[1] if using DBI
There are variants for other languages/interfaces, but I’m sure you’ll get the idea.

I got the idea and have created the following procedure (obsolete… Please see below)

RETURNING integer;
DEFINE lastid integer;
LET lastid = DBINFO(‘sqlca.sqlerrd1’);
RETURN lastid;

So to get the latest column you just use

select lastid() from table(set{1})

btw.: If you want to make use of this in Rails, I’d some success with:

class InformixConnect < ActiveRecord::Base
self.abstract_class = true
establish_connection :development_informix

def save
self.id = self.connection.select_value(“select lastid() from table(set{1})”)


so a model like

class Customer < InformixConnect


would be able to connect to Informix and to get correct values from the DB without the
usage of sequences!

Unfortunately the stuff above (overwriting the save method) does not work for some reasons.

I have patched

class InformixAdapter < AbstractAdapter

def prefetch_primary_key?(table_name = nil)

def insert(sql, name= nil, pk= nil, id_value= nil, sequence_name = nil)
select_value(“select lastid() from table(set{1})”)



This works!


Found another solution that works also with serial8 columns:

CREATE PROCEDURE lastid_both ()
RETURNING integer;
DEFINE lastid_1 integer;
DEFINE lastid_8 integer;
LET lastid_1,lastid_8 = DBINFO('sqlca.sqlerrd1'),DBINFO('serial8');
IF lastid_1 == 0 THEN
return lastid_8;
RETURN lastid_1;


class InformixConnect &lt; ActiveRecord::Base

def save(*args)
if new_record?
ret = super
pk = self.class.primary_key.to_s
tn = self.class.table_name.to_s
self.class.find_by_sql("select lastid_both() as serialid from table(set{1})").first.serialid)
Rails.logger.info("Informix received the following serial-id: #{self.id}")

ret = super

Fix broken application icons in Mac OS X Snow Leopard

So it happened again:

Most of my application icons were broken, i.e. only visible in a very low resolution.

After googling a bit I found the following discussion:

mdi’s suggestion did the trick for me: http://discussions.apple.com/message.jspa?messageID=10296267#10296267

What I did:

  • open Terminal.app (If you never did… : Try „spotlight-search“ –> Terminal)
  • enter cd /private/var/folders
  • enter sudo find . -name “com.apple.QuickLook.thumbnailcache”|xargs sudo rm -rf

                (you will have to enter your password)

  • Restart Finder.app using „Apple-Menu–> „quit immediately (It’s „Sofort Beenden“ in German. Dunno the english term) or press
  • command+option+escape“. Chose „Finder restart“.
  • Be happy 🙂

OK, to be honest I had to restart to be really happy 😐

NoMethodError: undefined method `empty?’ for 8:Fixnum

This f…ine error message above has been thrown during a

records = Model.find(:first).

Guess why:

I made use of a legacy table that contained the attribute „type“. I just had to add a


into my model and now everything’s OK.

Rails: Do you consider this as friendly error messages?


Hmmm… Kleine Fingerübung in Perl (pre-alpha :-))

Ah ja: Brainfuck: http://lmgtfy.com/?q=Brainfuck

#!/usr/bin/env perl
use Term::ReadKey;
ReadMode 'raw';
my $debug = 0;

my $code;
if ($ARGV[0]){
  { local $/ = undef; local *FILE; open FILE, "<".$ARGV[0]; $code = <FILE>; close FILE }

$code ||=
--------- . -------.>++++[<+++++>-]<+.>++++++++++.";

$code =~ s/[^\.,+-\[\]<>]//msg;
$| = 1;
my @val;
@val[ 0 .. 29999 ] = (0) x 30000;
my $vpt = 0;
my @ls;
my @le;
my $lpt = 0;
my $cc  = 0;
my @c   = split( '', $code );
my $nc  = @c;
while ( $cc < $nc ) {
    $_ = $c[ $cc++ ];
    print "vpt:$vpt \$val[\$vpt]"
      . $val[$vpt]
      . " loop_counter:$loop_counter loop(counter)_start:"
      . $ls[$loop_counter]
      . " loop(counter)_end:"
      . $le[$loop_counter]
      . " cc:$cc command:$_\n"
      if $debug;
    /</ and do { $vpt        and $vpt--; next };
    />/ and do { $vpt < @val and $vpt++; next };
    /\+/ and do { $val[$vpt] = $val[$vpt] + 1; next; };
    /\-/ and do { $val[$vpt] = $val[$vpt] - 1; next; };
    /\./ and do { print chr( $val[$vpt] ); next; };
    /\,/ and do { $val[$vpt] = ord( ReadKey 0 ); next; };
    /\[/ and do {
        if   ( $val[$vpt] ) { $ls[ $lpt++ ] = $cc - 1 }
        else                { $cc = defined $le[$lpt] ? $le[$lpt] : (index($code,']',$cc)+1) }
    /\]/ and do {
        $le[ --$lpt ] = $cc;
        $cc = $ls[$lpt];
print "\n";

Blogging via MacJournal

Ich konnte dem aktuellen http://www.macheist.com Nano-Bundle natürlich doch nicht widerstehen. Monkey-Islands war eine Versuchung wert und vor allen Dingen Tweetie 2.0.

Jetzt habe ich auch noch MacJournal dazu bekommen und bin eigentlich ziemlich begeistert.

  • Blogging mit einem vernünftigen Client
  • Verschlüsselung privater Einträge
  • Export von Einträgen als HTML, PDF etc.
  • Volltextsuche via Spotlight.
  • Synchronisation via Mobile-Me (muss noch TeamDrive ausprobieren)

Und alle so „Yeah“!

P.S. Und die Probleme von Safari mit WordPress brauchen mich jetzt auch nicht mehr zu kümmern

Spendenaktion für Haiti

@johnny von Spreeblick hat eine Spendenaktion für die Erdbebenopfer von Haiti in’s Leben gerufen.

Nicht, dass es nicht auch andere Wege des Spendens gäbe, aber das Problem ist ja (und das löst sich durch solche Aktionen halt), dass “man” (ja, auch ich) in der Regel den A… ja nicht hochkriegt.

Also: Wenn Ihr Eure Kontonummer noch kennt, einfach mal auf obigen Link clicken!

Danke sehr!