-
Munin: Could not open required defaults file: /root/.my.cnf
For some reason I kept getting this error (even when the file was readable by all) in one of the munin (mysql slave) plugins that I had written. So this was the solution that worked for me; under the [mysql*] section in /etc/munin/plugin-conf.d/munin-node I added this: env.mysqlopts -u{user} -p{password} and in my plugin I did…
-
MySQL KEY, PRIMARY KEY and NOT NULL.
Have a look at this sql statement: mysql> CREATE TABLE `t1` (`id` INT NULL AUTO_INCREMENT, KEY(`id`)); Query OK, 0 rows affected (0.92 sec) mysql> SHOW CREATE TABLE `t1`; +——-+————————————————————————————————————————-+ | Table | Create Table | +——-+————————————————————————————————————————-+ | t1 | CREATE TABLE `t1` ( `id` int(11) NOT NULL AUTO_INCREMENT, KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 |…
-
Wireless connection dropouts in Lucid Lynx
Since my upgrade to Lucid, I have been experiencing dropouts on my wireless connection and since the solutions that I had found on the net did not solve the above problem, I decide to script a temporary fix until it gets fixed in (K)Ubuntu or in the Kernel. I found that that after I get…
-
Lucid Lynx — Downgrading from PHP 5.3
I hit this bug after the upgrade to PHP 5.3 (which happened with my Kubuntu Upgrade to Lucid Lynx). I read in another bug report that this issue was fixed in the latest snaphshot, so I tried compiling from source – using the latest 5.3 snapshot. This didn’t go well, as I hit a seg…
-
Hacker News Sorter
I have just recently created a bookmarklet to sort the news stories on the front page of HN. There are a few minor issues that I have noticed but, should work for most parts. When you click on the bookmarklet, two links get created at the top as shown in the screenshot below: Clicking on…
-
InnoDB + MySQL Implicit Autocommit
Today, I spent about an hour debugging a part of the script that I was writing. This is what I faced: I had a function writing some logs into a table. The function was pretty simple as all it had to do was insert some data into a row (using the data passed to it).…
-
Getting visitor location in PHP.
I had been trying to track the location of visitors based on their IP addresses. I ran into problems earlier while trying to acheive that and gave up. Today, I Finally managed to do that. Thanks to the geodb availablehere. I hacked up a function that would accept an IP address as a parameter and…
-
news.ycombinator search
I am a regular reader of news.yc and like most people using that site, I wanted to be able to search the site. Since the site does not have an inbuilt search functionality, I created yc.news search here. Just like in SansJ, one can use the search plugin (FF and IE7 only) and search from…
-
Scriptaculous Draggable in Action.
(If you are in a hurry, go here, that is what the post is about.) It’s finally over!! Relief followed by pride-both preceded by an Idea- pretty much summarizes my feeling now. Recently I got a HTC Touch for my dad, which, I played around with for a while.I somehow feel, that, the Input devices…
-
Online Spell Checker…
This can be viewed online on my Social Search site Sansj.com. try searching for Yahoi Search. It is a good thing have a spell checker facility in a Search Engine, people are not always correct with their spelling and yeah sometimes typos do occur. I read somewhere about using a statistical model to develop a…