Google’s Chatback badge similar to Yahoo’s PingBox
Recently came across Google’s chatback badge for your website or blog’s visitors to chat with you.
http://www.google.com/talk/service/badge/New
Recently came across Google’s chatback badge for your website or blog’s visitors to chat with you.
http://www.google.com/talk/service/badge/New
I use recordmydesktop to produce screen casts occasionally. I was using the below command to convert from ogv to flv format.
mencoder -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=250:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=800:600 -o tutorial.flv out.ogv
In the output file which is tutorial.flv, there were small breaks in audio (hiccups). The ogv file was fine as when i played in movie player there were no hiccpus. So the hiccups were introduced during the conversion.
http://en.gentoo-wiki.com/wiki/HOWTO_Mencoder_Introduction_Guide helped me to make use of the command mencoder -oac help to view the options available and I chose the right options. This helped me to create the output file without any audio hiccups.
If you host your website on a JEE web or application server on a shared hosting plan (either private or shared instance), you may use the JSP code below to check the memory usage of your server. This will help you to know if the web hosting company really provides you what they promised. This is a simple but efficient tool.
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Your title here</title>
</head>
<body>
<h3>Total memory : <%=Runtime.getRuntime().totalMemory()%></h3>
<h3>Free memory : <%=Runtime.getRuntime().freeMemory()%></h3>
<h3>Max memory : <%=Runtime.getRuntime().maxMemory()%></h3>
<h3>Java version : <%=System.getProperties().getProperty("java.version")%></h3>
</body>
</html>
In this post we will create a Firefox plugin from scratch in 10 minutes. Navigate to any folder of your choice and we will call this as ROOT folder for the plugin.
Now let us decide what we want to do with the plugin. The plugin will contain links to various social networking sites like Twitter, Orkut (we limit to 2 as it is just an example).

Explanation for the folders/files created so far:
skin will contain the images and css files used in the plugin (if any). content folder will contain Javascript , XUL files involved in the plugin. chrome.manifest is self explanative and provides the information about the skin, overlay, content location to Firefox. install.rdf contains the information like plugin creator, minimum and maximum compatible versions of Firefox for the plugin.
Let us create a file called social.xul under content folder with the below lines of code.
<?xml version="1.0"?>
<overlay id="social_karthikeyanc_com"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" orient="vertical">
<script type="application/x-javascript"
src="chrome://social/content/social.js" />
<toolbox id="navigator-toolbox">
<toolbar id="Social-Toolbar" toolbarname="Social Toolbar" accesskey="H"
context="toolbar-context-menu"
hidden="false" persist="hidden">
<toolbarbutton id="Orkut-Button" tooltiptext="Orkut Home"
label="Go To Orkut" oncommand="loadURL('http://www.orkut.com')"/>
<toolbarseparator />
<toolbarbutton id="Twitter-Button" tooltiptext="Twitter Home"
label="Go To Twitter" oncommand="loadURL('http://www.twitter.com')"/>
</toolbar>
</toolbox>
</overlay>
Now create a file called social.js under content folder with the below code.
function loadURL(url)
{
// Set the browser window's location to the incoming URL
window._content.document.location = url;
// Make sure that we get the focus
window.content.focus();
}
Please open chrome.manifest empty file with a text editor and paste the lines below.
content social jar:chrome/social.jar!/content/ overlay chrome://browser/content/browser.xul chrome://social/content/social.xul skin social classic/1.0 jar:chrome/social.jar!/skin/
Open install.rdf and paste the lines below.
<?xml version="1.0"?>
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Description about="urn:mozilla:install-manifest">
<em:id>contact@yourwebsitename.com</em:id>
<em:version>1.0</em:version>
<em:type>2</em:type>
<!-- Target Application this extension can install into,
with minimum and maximum supported versions. -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>2.0</em:minVersion>
<em:maxVersion>3.5.*</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Front End MetaData -->
<em:name>www.Karthikeyanc.com</em:name>
<em:description>Karthikeyan C's Developer Blog</em:description>
<em:creator>Karthikeyan Chockalingam</em:creator>
<em:homepageURL>http://www.karthikeyanc.com/</em:homepageURL>
</Description>
</RDF>
Now navigate to chrome folder and execute the below command. (I am using Ubuntu. Same can be achieved in other OS like windows using a zip utility like 7-zip)
zip -r social.jar content/* skin/*
Now navigate one step up to ROOT folder and execute the below command to create your Firefox plugin social.xpi. You can install the plugin by choosing File –Open File in Firefox menu.
zip social.xpi install.rdf chrome.manifest chrome/social.jar
When we change our website’s hosting provider from ProviderA to ProviderB we need to change the domain name servers with the domain registration account (like GoDaddy). This may take anywhere from few minutes to 72 hours. To check if the DNS information update has happened, I found the below links very helpful.
http://www.preshweb.co.uk/cgi-bin/dns-propagation-tracker.pl
To install MySQL database schema browser, SQL executor and administrator, use the following command. It gives a cool GUI for us to work with.
sudo apt-get install mysql-query-browser mysql-admin
Many of the shared server hosting providers do not enable email piping. Hence OsTicket may not work resulting in an error “local delivery failed”.
But they may provide an option to use IMAP/POP poll to retrieve the ticket information (This should be enabled in the Email related settings in OsTicket). Now to enable this poll we have to setup a cronjob. Before setting up cronjob, we can know the PHP location by running the following command.
which php
which will produce a result like
/usr/local/bin/php
.
Now set up a cronjob with the following command.
/usr/local/bin/php /home/username/pathToOsTicketInstallation/api/cron.php
Note: Please ensure cron.php has executable rights (else run chmod +x)
It may be a requirement to clean up subversion related files (like when we move from subversion to another version control system which does not support importing history from subversion). The below command can be used in Linux (Ubuntu) to do the same.
find -name "\.svn" -exec rm -rf {} \;