Absolutely Tech

[HowTo] Stop phpmyadmin from asking username, password in localhost

Yesterday, I showed you how you can keep local installation of phpmyadmin from logging you out every few minutes. I took one more step and edited configuration to not ask me username, password at all. Now phpmyadmin never asks me for mysql username and password.

Keep in mind if you follow this tutorial anyone would be able to access your database using phpmyadmin unless you deny access via apache configuration. Don’t do this on production servers.

Steps to follow:

  • Run: gksudo gedit /etc/phpmyadmin/config.inc.php
  • Find:
    $cfg['Servers'][$i]['auth_type'] = 'cookie';

    And change it to:

    $cfg['Servers'][$i]['auth_type'] = 'config';
  • Just below this line, add:
    $cfg['Servers'][$i]['user'] = '';
    $cfg['Servers'][$i]['password'] = '';

    Replace and with mysql username and password.

  • Save the file.
  • Changes will be applied immediately, no need to restart apache.

Now, you’ll never have to enter username and password in phpmyadmin.

Cheers!

[SOLVED] Error “undefined reference to `libiconv_open’” while compiling

I was trying to compile sphinx server from source but I go the following errors on executing make

undefined reference to `libiconv_open’
undefined reference to `libiconv’
undefined reference to `libiconv_close’

To fix the error, you can compile without iconv (multiple encoding support) support. Use the following commands to compile. You can add more parameters as per your requirements.

./configure --without-iconv
make CFLAGS=-liconv
make install

I hope that helps

Undo recent facebook style changes

Recently facebook made its font smaller. It worried lots of people with weaker eye sight. The font looks ugly as well. They reduced it all the way to 11px from 13px. And changed its color to #000 from #333. I made a quick greasemonkey script as it works cross-browser to fix the issue until facebook does something about it.

You can install the script from the following link:
http://userscripts.org/scripts/show/89552

Google Chrome: Chrome doesn’t need any extension for this to work. It’ll install the script right away.
Firefox: You need to install greasemonkey extension from https://addons.mozilla.org/en-US/firefox/addon/748/

Opera: It has its own Userjs API. This script might work on Opera. However, it has not yet been tested.

I don’t recommend using any version of IE, hence no instructions for that.

[Solved] Subtitles not being displayed in VLC in Ubuntu

I had this problem where subtitles were not being shown in VLC. No matter what I did, it just wouldn’t display. I reinstalled VLC but still it had problems. So I removed all the vlc config files to reset the settings and fix the problem.

rm -rf ~/.config/vlc

That fixed it.

Cheers!

[HowTo] Block and Unblock friends on facebook

A lot of my friends have been asking this to me so I’ll just go ahead and make a blog post for everyone. According to facebook:

If you block someone, they will not be able to find you in a Facebook search, see your profile, or interact with you through Facebook channels (such as Wall posts, Poke, etc.). Any Facebook ties you currently have with a person you block will be broken (for example, friendship connections, Relationship Status, etc.). Note that blocking someone may not prevent all communications and interactions in third-party applications, and does not extend to elsewhere on the Internet.

So in essence you become invisible to that person and there is no way he/she can add you back or search for you unless he/she makes a new profile.

Blocking a friend:

The blocking process is fairly simple and most of you already know it:
You just have to click on ‘Report/Block this Person‘ and check the “Block this person” and click on Submit.

Facebook - Block Friend

Facebook - Block Friend

Unblocking a friend:

Unblocking friend is a little different and is a bit difficult to find at first. Thats why people have been asking about that to me.
I’ll show you how to do it: Read the rest of this entry »

[HOWTO] Send emails(using mail function) from localhost in PHP through msmtp (using gmail account) on Linux

There’ve been lots of times when I wanted to use the mail() function on my local server. I am sure lots of you would’ve been wanting it too but most of you would’ve settled for PHPMailer or just used a web host to test the code instead. I myself had been doing the same until recently when I finally decided to do some research and get it to work.

Here are the steps in short for the geeks who like to do things on their own:
All I did was used smtp client called msmtp, configured it to work with my gmail account and configured PHP to use msmtp to send emails.

This tutorial is only applicable for linux users. I’ll write another article for windows users soon when I get my hands on a windows box.
All the commands used in the instructions are for Ubuntu, however you may use corresponding commands for your distro (for eg; you can use yum install instead of apt-get install on fedora, redhat, centos.

Step by step instructions:

Read the rest of this entry »

[HOWTO] Install Opera 10.6 via PPA in Ubuntu

Opera 10.6 which was released yesterday is currently one of the fastest browsers. It has beaten Chrome in javascript speed test. It also features better support for HTML5, WebM video support.

You can now install it on Ubuntu via PPA.

Add the PPA in your repository:


sudo sh -c 'echo "deb http://deb.opera.com/opera/ stable non-free" >> /etc/apt/sources.list.d/opera.list'

Add the key:


sudo sh -c 'wget -O - http://deb.opera.com/archive.key | apt-key add -'

Update your package list:

sudo apt-get update

Finally install opera:

sudo apt-get install opera

Enjoy the all new opera!
Cheers!

[Solved] Unable to enumerate USB device (Disabling ehci_hcd)

Some hardware just don’t work with ehci_hcd on Karmic Koala. My memory stick from transcend refused to work no matter what I did. After plugging the device nothing happened, doing dmesg showed me the following error:

Apr 18 10:59:04 dpac-laptop kernel: [73668.388060] usb 1-2: new high speed USB device using ehci_hcd and address 5
Apr 18 10:59:04 dpac-laptop kernel: [73668.473034] hub 1-0:1.0: unable to enumerate USB device on port 2

After searching a lot, I came to a conclusion that my device doesn’t work with USB 2.0. So I disabled the ehci_hcd to make it work.

Since Karmic doesn’t use ehci_hcd as a module, modprobe -r ehci_hcd no longer works. The module is compiled into kernel. To disable it execute the following commands in terminal:
Read the rest of this entry »

Type in Devanagari in any field on any site

Now, you can type directly in Devangari script on any text field on any website. Thanks to http://code.google.com/p/t13n/

Just drag the link below to your bookmarks bar:
Drag this link to your bookmarks bar

How to use

After a webpage loads, just click on the bookmarklet to enable it. After enabling it, you can type in Devanagari on any text field on that webpage. Just type the words in English and it will be transliterated to Devanagari.

Read the rest of this entry »

[HowTo] Optimize Mozilla Firefox for better performance

Firefox is getting very popular lately, mainly due to its customizability. I use firefox as my main browser and use all sorts of addons which help me in web-development. These addons make my firefox hungry but I can’t do without them. So, instead I tweaked around some settings in firefox which made it much responsive and faster than before.

To tweak those settings, follow the following steps:

1. Type about:config in your address bar and hit enter.
Read the rest of this entry »