Skip to main content

Posts

Showing posts from 2013

Installing Ralink 3090 wifi driver

I installed Kubuntu 10.10 on my new laptop, my laptop is Compaq CQ62- 308AX. It has Ralink 3090 wifi, which is not automatically detected by Kubuntu. Even restricted driver manager does not show any option for this device. So I downloaded the driver from Ralink site (http://www.ralinktech.com/support.php?s=2).  It is in the source format. I thought I might have to patch the kernel source. I went through the readme file and I found that I don’t have to compile kernel ( yippee an hr saved). Only device driver source is needed to be compile. These days things are much more simple. So I compiled the driver by running command “make” and installed it by “make install”.  It has compiled other ralink wifi modules along with 3090 module. After installation (using ‘make install’)  reboot the machine, reboot is not necessary in Linux after installing driver.  After reboot it loaded incorrect  rt2086 module. So I tried manually unloading and loading module using insmode...

Adding additional class to a button in drupal

Recently we were building a multi-domain site, we are using same theme for all sites but we want to have different colors for buttons for each domain. We achieved this using my overriding theme_button in template.php of theme, here is the snippet. /** * Overwrite theme_button() * @file template.php */ function mytheme_button($variables) { $element = $variables['element']; // Add some extra conditions to make sure we're only adding // the classto the right submit button Now add our custom class if (isset($element['#attributes'])) { $element['#attributes']['class'] [] = 'button'; $domain = domain_get_domain(); $element['#attributes']['class'] [] = $domain['machine_name']; } $variables['element'] = $element; return theme_button($variables); }

OpenSuse 12.3 - Review - Very good performance

The first thing that I note is faster booting. It takes about 15 secs, with previous version it was about 45 secs. Second thing is better performance. Desktop is very responsive and takes lesser memory. As compared to Ubuntu 12.04 with KDE 4.10, it consumes about 300MB less RAM in OpenSuse on my office laptop. Installation I installed it on 2 different variants on 2 different laptops, first one is Dell Vostro- Core i5 2nd generation,4GB ram and second is Compaq CQ-62 AMD Phenom X4, 6GB ram. I installed KDE live on AMD one and Mango Linux on intel one. Mango Linux a OpenSuse derivative developed and maintained by me, contains all additional stuff that is needed after installing OpenSuse, like Google chrome, flash, google earth, vlc, etc... and updates. Installation is no different from previous version. Installation went smooth without any issue. Hardware support On both the laptops all the device are detected and are working well. For the first time in KDE bluetooth is worki...

html encode/decode in drupal

Like all major CMS drupal stores text fields in encoded html format, to prevent cross site scripting attacks. Some times drupal does not process custom fields and encoded text is displayed as it is. I come across similar issue in my current project. I also post question on StackOverflow. While search for solution I come to know about decode_entities function. decode_entities converts html encoded text to more friendly text. Similary to encode special charters in text you can use check_plain. decode_entities function http://api.drupal.org/api/drupal/includes!unicode.inc/function/decode_entities/7 check_plain function http://api.drupal.org/api/drupal/includes!bootstrap.inc/function/check_plain/7 My question on StackOverflow http://stackoverflow.com/questions/14229641/rss-feeds-view-showing-encoded-special-character-in-title