Categories
Web

Facepalm @ Google

Finally a good use for the color picker in Google images 🙂

http://images.google.no/images?q=Facepalm&gbv=2&hl=no&sa=G&imgcolor=black

Categories
Twitter

List of people twittering about the Iran clashes

This post contains information/links to twitterers twittering useful information about the clashes in Iran, that started one year ago today (12th of june 2009)

Updated 12th june 2010, 12:45 GMT

Updated last hour:
EANewsFeed – Tweets about it
JShahryar – Tweets about it
dadashiii – Tweets about it
Bsalamati – Tweets about it
mumke – Tweets about it
lissnup – Tweets about it
DominiqueRdr – Tweets about it
RayMorrison – Tweets about it
mamad2020 – Tweets about it

Updated last two hours:
sayahcnn – CNN Correspondent
Pray4Iran General tweeting around Iran

Other info

If you want to read up about last years event, i reccomend http://www.thenation.com/blogs/notion/443634

Categories
Real life

Are you driving?

Categories
Software Ubuntu

Getting Groupwise to work on Ubuntu 64bit (9.04)

Just a quick post on what i did to get Groupwise up and running on Ubuntu 64bit:

1) Installed a 32bit virtual Ubuntu machine, and converted the Groupwise installer to a .deb package with “alien -c filename”.

2) Moved the .deb package back to the host machine.

3) Installed 32bit java libraries “sudo apt-get install ia32-sun-java6-bin”

4) Forced installation of the Groupwise client “sudo dpkg -i –force-architecture novell-groupwise-gwclient_8.0.0-84911_i386.deb”

5) And it works 🙂

Categories
Java

Hint: “org.apache.jasper.JasperException: java.lang.NumberFormatException”

Getting the exception “org.apache.jasper.JasperException: java.lang.NumberFormatException” when developing a JavaEE-app?

If you are basing yourself on data from a query, make shure that you are doing a SELECT against the table name and NOT the individual fields!

Categories
Linux

Cron commands not working when outputting to stderr(2>&1)

The error:

username@host:/home/foo> fetchmail -f /opt/rt-fetchmail/fetchmail 2>&1 /dev/null
Enter password for username@/dev/null:

Solution: Change the cron entry / command to the following:

fetchmail -f /opt/rt-fetchmail/fetchmail > /dev/null 2>&1

This will stop -all- output from appearing.

Categories
Java

A hint for the “Object foo is not a known entity type” errors from Glassfish

As a JavaEE-codemonkey you have perhaps noticed this error:

java.lang.IllegalArgumentException: Object: Ting@193c227 is not a known entity type.

This will occur when you have redeployed an app f.ex through Eclipse to Glassfish, the Glassfish server has not quite understood that it`s time to update its version, so what you need to do then is to simply restart the server (or domain).

Categories
Web development

Show/hide a div with javascript

Looking for a simple javascript to show/hide a given text/element?

Here`s all you need! 🙂

<!--
   Simple show/hide system
   @author - Tor Henning Ueland
-->
<script language="javascript" type="text/javascript">

        //ShowHide function - takes the div ID as argument
        function showHide(divId) {

                //Switch the display mode for the the div to hide
                var theDiv = document.getElementById(divId);
                if(theDiv.style.display == 'block')
                        theDiv.style.display = 'none';
                else
                        theDiv.style.display = 'block';

                //Remove this part if you dont want a "show/hide" text
                var showText = document.getElementById("showText");
                var hideText = document.getElementById("hideText");

                //Switch the display mode for the the show/hide text/div
                if(showText.style.display == 'block') {
                        showText.style.display = 'none';
                        hideText.style.display = 'block';
                } else {
                        showText.style.display = 'block';
                        hideText.style.display = 'none';
                }
        }
</script>

<div id="showHideMe" style="display:none;">
        Now you see me!
</div>

<a href="#" onClick="showHide('showHideMe')">
        <div id="showText" style="display:block;">Show</div>
        <div id="hideText" style="display:none;">Hide</div>
</a>
Categories
Linux

Fix for the “Out of memory! Callback called exit.” error in Request Tracker (RT)

When RT is upgraded, users can experience WSOD(White Screen Of Death), all the log will say is:
“Out of memory! Callback called exit.”. Not so informative eh?

The solution is pretty simple, run this query in the database:

“ALTER TABLE sessions CHANGE a_session a_session LONGBLOB;”

Then clear the table with:

TRUNCATE TABLE `sessions`;

Any logged in users will be logged out, but the problem should disappear.

Categories
Java Linux

One possible solution for Glassfish cluster node-agent startup problems

Just a quick hint for those of you who are experiencing problem with getting node-agents up and running in a Glassfish cluster.

If the problem is that the asadmin start-agent command simply times out/uses a long time to start, and even possibly returning a filenotfoundexception. The problem could be as simple as a firewall blocking traffic to/from the master-node. A quick way to check it is to simply disable the FW.

Note that if the master-node does not see the node-agent status, it is also caused by FW-issues, fix the FW and then restart the node-agent(s), then it all should work like a charm!

Categories
Linux

SysRq-reboot macro for Blackbox KVM software

A nice way of rebooting a frozen Linux-based server when you do not have a power switch available is to use the SysRq-abilities. (Ubuntu Example.) Blackbox does not have a default macro installed for just that, but you can create a new macro and insert the following:

“<Alt-PRESS><Print Screen><Alt-RELEASE>RSEIUB”

This will create a working macro for writing any data in cache to disk, kill all processes (Sigkill), remount mounted disks and perform a reboot.

Categories
SLES Software

How to fix that stupid backspace in Vim on SLES

Sometimes the backspace button can be a real pain on SLES-systems, but the fix is simple!

Add this to ~/.vimrc:
set backspace=indent,eol,start