Skip to main content


Showing posts from June, 2011

MySql Copying Table Structures.

Some times you need to copy only table structures across databases. This article describes two ways of doing it.

If the whole database schema need to be exported, mysqldump is very effective. A --nodata flag will dump all tables' schema.

Like this.
mysqldump --nodata -p -u username databaseName
But if you want to copy a specific table, individually, you could use "create table like" feature. You could create it even from a different database. However it must be on the same mysqld instance.

Like this.
create table newtable like oldtable; --Or from a table in other database create table mytable like otherdatabase.tablename;

Developing Userscripts for Chrome (caveats)

To develop Chrome extensions, crx is the best way. But the user scripts that are developed in general for Greasemonkey can also be delivered for Chrome, if a few easy rules are followed.

1. @required and @resource don't work.

By default, atleast for now, These two Userscript metatags donot work on Chrome. If you need to load a js file, instead of using @required - try to use document.createElement. Similarly with @resource.

2. Some GreaseMonkey helper methods don't work or are restricted.

Methods with GM_ prefix from userscript api may not work. Particularly, unsafeWindow, GM_registerMenuCommand, GM_setValue, or GM_getValue are not supported. GM_xmlhttpRequest will work but not only on the same domain.

3. @includes are not shown while installing.
This may not be a deal breaker for developers, but sure is for users. The patterns used in @include is not shown while installing. Instead a generic message is shown as below. This message may scare the users away.

To over come this…

Google: Green Fleet.

Here is one company committed to Green alternative fuels and reducing carbon foot print. Google is no less a real life research lab. Plugin Electric cars are the fastest way to remove dependency on oil. They may eventually become energy hogs (if everyone will buy these), but for the moment, they are a viable solution. Advances in renewable energy may make electric even cheaper, easy to produce - until then, its only time for ideas.. like these..

Reduce Yahoo mail neo header space for more room

Update: Yahoo mail with new layout renders this obsolete.

The newer Yahoo mail beta (neo) really is a faster UI. However, The large header with room that is unused is a let down.  This one time, it appears that, Yahoo did not take into account the importance of real estate on top of the page, hitting User Experience. Reduce Yahoo mail neo header space for more room by installing SarathOnline's "Spacier Yahoo Neo" userscript below

Install YNeo UserScript
by SarathOnline


The user script is fairly simple. You could install it in Firefox as a Greasemonkey script. Or install it on chrome directly. If you are new to UserScripts, follow these instructions to install them on your browser.

Be assured, it has no malicious code. All it does is install a correcting css to the document. The css file is located here.  And the script itself.
(function(){ var d=document,sid='__sar__yneo', fn=''; i…

Installing Userscripts in Firefox, Opera, Chrome

Want to install a userscript on your browser. Go no further. Here are simple instructions and caveats for installing Userscripts in Firefox, Opera, Chrome. If you want to author your own scripts, here is a beginner's tutorial.