Wednesday, August 18, 2010

How to update the Bios on a HP Desktop running Linux

Ok so I'm on some training where we have HP DX7400 PCs with 6GB Ram. Only problem is that the OS (SLES 11) only seems to see 3GB. First check was to make sure it was a 64bit OS which was fine. Then like I've found before the HP machine needed a BIOS update to see the 6GB at an OS level.

So here's what I did to get it sorted:

1) Download BIOS update from HP website.
2) Run BIOS update software on separate Windows PC to extract files. (You should also be able to do this under Wine)
3) Make as USB Boot disk as per (http://wiki.fdos.org/Installation/BootDiskCreateUSB) and also include the awdflash.exe and bios file when you do this by copying them into /tmp/fs-root
4) Then just boot of the USB and run awdflash with the bios file and your OS should now be able to see all 6GB ram.

No mess no fuss. This is the second HP PC type I've found that does this, I'm starting to wonder if HP don't want you upgrading these machines with so much memory. I'm sure they'd much prefer you to buy a server with 6GB Ram as opposed to upgrading your desktop PC.

Tuesday, August 17, 2010

CodeIgniter remove index.php from URL

Ok I needed to make a note of this cause there are hundreds of posts on this and this is my one to add to the mix on how I got it to work.
This was on my Ubuntu desktop where I'd setup CodeIgniter.

1)  Add .htaccess file to /var/www with the following content:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

2) Check ModRewriter is enabled:


cat /etc/apache2/mods-enabled/rewrite.load
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so


3) Make sure AllowOverride is set to all

This file: /etc/apache2/sites-enabled/000-default
Should have section like:

       
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
       


4) Then restart apache if you made changes to apache config

And then you should be able to access site without the index.php in the URL.

NiCe :-)

Monday, August 16, 2010

Another Monday in Jozi

Well it was off to work again this morning. Lucky me I ride against the traffic most of the way. I saw two mini bus taxis heading into oncoming traffic to try and avoid the traffic on their side of the road. I guess you can say this is pretty normal for South Africa, but hey, always fun to see when they come head-to-head with a huge BMX 5 series and have no where to go.

I also glad to report that this past weekends round of 'knock-downs' was successful with a light pole in Randburg been completely taken down. Like always it did not look pretty and not anything like a little bumper bashing with the pole. I really should start collecting photos, maybe then people will think twice before drinking and driving. What can I say is drunk people love to knock down traffic lights, light poles and just about anything close to the road in Jozi. I've decide to call this weekend activity in Jozi 'knock-downs' because it seem to be as regular as clockwork, you can look out every Monday morning for the aftermath.

And wow as I read the news I hear about another Taxi accident:

37 hurt in mangled taxis


 "Johannesburg - Thirty-seven people were injured in two separate taxi accidents in Johannesburg on Monday morning, emergency services said.

Spokesperson Percy Morokane said the first accident occurred at 05:30 along the Golden Highway.

"The taxi was travelling from Orange Farm, to the Jo'burg CBD when the driver lost control of the vehicle, and it overturned," he said.

Eleven people were injured, five seriously.

The second accident occurred at the corner of Joubert and Empire roads, in Parktown.
Two taxis collided, leaving 26 people injured, 15 of them, seriously.

"The period between sunrise and sunset, is always a gap for accidents such as these to occur. Motorists must be extra aware during these hours," he said."

ref: http://www.news24.com/SouthAfrica/News/37-hurt-in-mangled-taxis-20100816

Monday, August 2, 2010

Ubuntu Problem with LG Flatron L222WS

Picked this one up a while ago, but thought I might just make a note of it now.

It also seems to have been logged as bug for Ubuntu: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/212018

This is what I did to resolve:

1st I need an xorg.cof file:

sudo service gdm stop
sudo Xorg -configure


Then we edit it and add the lines in bold:

Section "Monitor"
    #DisplaySize      470   300    # mm
    Identifier   "Monitor0"
    VendorName   "GSM"
    ModelName    "L222W"
    HorizSync    28.0 - 83.0
    VertRefresh  56.0 - 75.0
    Option        "DPMS"
    Modeline "1680x1050 at 60.0" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 +hsync -vsync
    Option "PreferredMode" "1680x1050 at 60.0"

EndSection

Then start X again

sudo service gdm start


Update: 16/1/2011

This did work for my old Video card, now I've upgraded to ATI HD 5770 it did not seem to do the trick.

This line did however work:

Virtual    1680    1050
Modes        "1680x1050@60"    "1600x1024@60"    "1440x900@60"    "1280x800@60"    "1280x720@60"    "1280x768@60"    "800x600@60"    "800x600@56"

Source : http://ubuntuforums.org/showthread.php?t=696269

Tuesday, June 1, 2010

JavaScript Association Array

In JS here's how you loop through association array.

    for (var j in params) {
        alert('key is: ' + j + ', value is: ' + params[j]);
    }


Warning: params.length will always be equal to 0

Monday, May 31, 2010

Escape Double Quotes in JS

Ok so it seems like I'm doing some coding again. Here's how to escape a double quote in JavaScript from PHP:


onclick=\"addParameter('fun\\x22 and \\x22 games');\"

Tuesday, March 23, 2010

Brainshare Post 1

Well its Tuesday morning and here we sit once again at BS Salt Lake City. Already sick of the food, lucky they have some healthy options for breakfast, but the english muffin may give you a heart attack with the amount of cheese on it.

Very sadly the registration PCs seem to all be running Windows XP. Last time I was here I remember something called SLED, but it seems the Novell M$ partnership is stronger than ever. The second biggest stand besides the Novell one is the interoperability stand, aka M$ stand.

Yesterdays sessions where nothing to shout about, was still feeling a bit jetlagged, but it seems no one was too excited about anything and the opening keynote seemed to drag on forever.

I'm really hoping today turns out better, changed my schedule to include more technical sessions and less sales fluff.

Also there's only about 2500 people attending this year, as opposed to about 6000 last time I was here (2006), which could account for the lack of a food court hall, them rather opting to have food stands. Also I must say they could have some more seating about the session areas, seems like every open place with a power outlet is always occupied.

Now onto the more geeking stuff, the Internet speeds seems to be OK, better than last time, but the wireless seems to intermittently disconnect you now and than, speeds range from about 50KB to about 400KB depending on time of day. I've already downloaded Novell Designer and Analyser which refused to come down through one of our clients proxies.

Anyway time to run, hopefully I can post some photos soon.

Wednesday, February 24, 2010

Novell eDirectory Group Membership with PHP

You can use the following PHP functions to manage group membership for eDirectory:

function AddUserToGroup($ldap,$userdn,$groupdn) {   
    $userInfo["groupMembership"]=$groupdn;
    $userInfo["securityEquals"]=$groupdn;
    if(ldap_mod_add($ldap,$userdn,$userInfo)===TRUE) {   
        $groupInfo["member"]=$userdn;
        $groupInfo["equivalentToMe"]=$userdn;
        return ldap_mod_add($ldap,$groupdn,$groupInfo);
    }
    return FALSE;
}

function RemoveUserFromGroup($ldap,$userdn,$groupdn) {   
    $groupInfo["member"]=$userdn;
    $groupInfo["equivalentToMe"]=$userdn;
    if(ldap_mod_del($ldap,$groupdn,$groupInfo)===TRUE) {   
        $userInfo["groupMembership"]=$groupdn;
        return ldap_mod_del($ldap,$userdn,$userInfo);
    }
    return FALSE;
}

Friday, February 12, 2010

Thanks Google for Blocking Emails like this

I really need to wonder what type of people fall for emails like this:

 

I guess people would not be doing this if they did not find people falling for these scam emails.

Wednesday, February 10, 2010

Firebug 1.5 and Ubuntu 64 bit

Note to self, don't install Firebug from Firefox, rather do:

sudo apt-get install firebug

Ref: https://bugs.launchpad.net/ubuntu/+source/firefox-3.5/+bug/449744

Tuesday, February 2, 2010

VirtualBox Slow Performance with Shared Folder

Wow, was really give frustruted with the slow reponse using shared folders in VirutalBox. VirutalBox is awesome, but this was really making me to start to long for VMware. Lucky there was a fix :-)

http://www.virtualbox.org/ticket/1728

Basically you just need to disable NetBios in your guest, and tada the shared folders work much better :-)

Some very old poetry of mine

Tears

waves with foam frothing tips of crispy dew wash the ocean floor,
with rainbow colour shells sparkling in the dwindling light of a gray moon.
the sky has a darkness that seems to swallow the light,
only a shimmering line of the moon can be seen, no joy
in this sky, it drips tears of blackness upon the land
spreading like disease it covers all.
pray that this darkness never comes because the coldness it brings has never been felt,
it will cut ever living being down one by one until there is no more,
    for tears of darkness are never wiped dry.


Green

if grass is green what can be greener?

the flowers in my garden speak of grass that is greener,
        but I say I know better…
the pine trees on the hill tops speak of grass that is greener,
        but I say I know better…
the sparkling streams filled with sunlight speak of grass that is greener,
        but I say I know better…
the grass on the road side says it’s greener,
        but is grass really green?

Friday, December 11, 2009

Some nice addons for Ubuntu

Get those codecs to play all media formats and dvds:

http://www.ubuntugeek.com/install-mplayer-and-multimedia-codecs-libdvdcss2w32codecsw64codecs-in-ubuntu-9-10-karmic.html

Get cntlm to get through those M$ ISA proxies:

sudo apt-get install cntlm

Then just edit the
/etc/cntlm.conf
and fill in the proxy details then restart it with
/etc/init.d/cntlm restart
Then export your proxy and your in business :-)
export http://localhost:3128/

How to Listen to Streaming Radio on Ubuntu

Ok so I wanted to listen to Highveld radio on Ubuntu. Only problem was their website only seemed to catered for Windows. So after some digging I found the mms stream URL and gave it a try with:
mplayer mms://196.35.64.36/highveld_22
but got this:
connect error: Connection refused
No stream found to handle url mms://196.35.64.36/highveld_22

So I just changed it to:
mplayer http://196.35.64.36/highveld_22

and we're in business :-)

Followers