Analytics


Google

Friday, December 3, 2010

How to set up automatic alert using Gmail and GCalendar

This is how you can set up an automatic alert that will send out email to a group on a fixed schedule. It is a two step process.

Step 1

Create a Calendar entry in your Google Calendar. Specify the time and also check the repeat, the specify the repeat frequency, daily, weekly, monthly etc.



Make sure to have add Email Reminder.


Step 2

From Step 1, you should receive an email from your calendar about 10 minutes (or what ever time you set before the actual time.

After receiving the first alert, create a filter from it.  The mail will be from calendar-notification@google.com.

So create your filter, as follow:


In the Has the words field, key in the words that match your calendar title. Then click Next Step.


Select Forward it to: and then enter the email you want to forward the alert to.  If you are using a corporate gmail account, you can use groups created by your company admin.  If you are using the free public gmail account, each filter can only be forwarded to one email account and also the recipient need to agree by either clicking on a link or to send you back the authorization code.



Thursday, November 25, 2010

Debugging and Testing tools for PHP

This is a bookmark to an article on the above.

http://phpbuilder.com/columns/10-Testing-Debugging-Tools/Jason_Gilmore11172010.php3

Wednesday, November 24, 2010

Virus on FaceBook and MySpace

I just received a warning that there is a trojan worm is now spreading like wildfire on Facebook and MySpace. The name of the work is known as koobface.

It is designed to steal your info, invade your system and shut it down. In order to avoid it:
  • do not open the link to Barack Obama Clinton Scandal. 
  • Do not accept any friend request from SmartGirl15. 

I am not sure how accurate the warning is but better to safe then sorry.

Saturday, November 20, 2010

How to uninstall Microsoft Choice Guard

Microsoft Choice Guard is automatically installed on your computer when you install Windows Live.  To uninstall Choice guard, follow the following steps (from the following discussion):


Microsoft Choice Guard

Instructions to uninstall Choice Guard

For Windows XP:

1) Start
2) Run
3) Copy the following line into the 'Open' field:
msiexec /x {8FFC5648-FAF8-43A3-BC8F-42BA1E275C4E}
4) OK

Choice Guard will now be uninstalled.

On Windows 7, use the following command:

MsiExec.exe /X{F0E12BBA-AD66-4022-A453-A1C8A0C4D570}

Tuesday, November 16, 2010

Performing a Find in Google Spreadsheet

You can write scripts for the various modules in Google Apps using JavaScript (just as you do scripts in Microsoft Office using VBScript).    I have not been able to perform a predefined method to perform a find.  This is a code that is provided by Henrique Abreu.  The discussion is found here.

The code is as follow:

function find(sheet,searchKey) {
  var data = sheet.getDataRange().getValues();
  for( var i in data )
    for( var j in data[i] )
      if( searchKey == data[i][j] )
        return sheet.getRange(parseInt(i)+1,parseInt(j)+1);
  return null;
}

To use the code, you can just call it as follow:

function usageExample() {
  //replace 1st occurence of "foo" with "bar"
  var range = find(SpreadsheetApp.getActiveSheet(),"foo");
  if( range != null )
    range.setValue("bar");
}

Wednesday, November 10, 2010

HP Expert Day - Nov 10, 2010

From the following page.


Don't miss our first community Expert Day on the topic of Operations Management, which starts tomorrow at 8am Pacific Standard Time.  Simply NAVIGATE HERE and start asking your questions! 

Participating HP Experts will be identified by the HP Expert icon next to their names.


Afraid you'll forget about this great event tomorrow? Download the event to your Outlook calendar. Simply open the linked file and "save and close".


Spread the word!  Give your colleagues and friends this shortcut URL: http://ow.ly/31CWX

Expert Day is a 24-hour forum based event where you can log in and ask questions of HP Operations Management Experts who are ready to help you online.  

Topics appropriate for this Expert Day would include: 
  • How to monitor different IT environments (heterogeneous, virtualized, private cloud, etc.)
  • Best practices
  • Product integrations
  • Tips and tricks
  • Using agents and agentless monitoring together
  • Information on new products (Operations Manager 9, SiteScope 11, Operations Manager i9) 
  • Product features
  • Resources (requests for case studies, white papers, and collateral)

Portable Apps Suite

The following is a link to some portable applications that makes it easy for testing.

http://portableapps.com/suite

Wednesday, November 3, 2010

XML Editors

Found a pretty neat XML editor at http://www.exchangerxml.com/index.html but it is very confusing, it claims that there is a free version and a commercial version but I was unable to find the commercial version.  All the features indicated on the commercial is found in the version I downloaded but did not see a way to register.  This is a good editor since it also provides for XSLT editing.

Alternative ones without XSLT debugging capabilities are found in the following:

http://symbolclick.com/index.htm
http://free.editix.com/

Personally I still like XSLTMajic from Microsoft that was discontinued support severals years ago.  Managed to find the link.

Screen capture utility

Windows 7 comes with a built in screen capture utility unless you are using the started edition.  For those using earlier version of Windows you have to find your own.

The following is a good freeware to perform screen capture:

http://getgreenshot.org/

Previously, I was using Printkey but this one looks more stable.

Thursday, October 21, 2010

Gmail advanced search options

This is a bookmark to Gmail advanced search option.  The original article is found here.



OperatorDefinitionExample(s)
from:Used to specify the senderExample: from:amy

Meaning: Messages from Amy
to:Used to specify a recipientExample:to:david
Meaning: All messages that were sent to David (by you or someone else)
subject:Search for words in the subject lineExample:subject:dinner
Meaning: Messages that have the word "dinner" in the subject
ORSearch for messages matching term A or term B*

*OR must be in all caps
Example: from:amy OR from:david
Meaning: Messages from Amy or from David
-

(hyphen)
Used to exclude messages from your searchExample: dinner -movie
Meaning: Messages that contain the word "dinner" but do not contain the word "movie"
label:Search for messages by label*

*There isn't a search operator for unlabeled messages
Example: from:amy label:friends
has:attachmentSearch for messages with an attachmentExample: from:david has:attachment
Meaning: Messages from David that have an attachment
list:Search for messages on mailing listsExample: list:info@example.com
Meaning: Messages with the words info@example.com in the headers, sent to or from this list
filename:Search for an attachment by name or typeExample: filename:physicshomework.txt
Meaning: Messages with an attachment name "physicshomework.txt"

Example: label:work filename:pdf
Meaning: Messages labeled "work" that also have a PDF file as an attachment
" "

(quotes)
Used to search for an exact phrase*

*Capitalization isn't taken into consideration
Example: "i'm feeling lucky"  Meaning: Messages containing the phrase "i'm feeling lucky" or "I'm feeling lucky"

Example:
subject:"dinner and a movie"

Meaning: Messages containing the phrase "dinner and a movie" in the subject
( )Used to group words

Used to specify terms that shouldn't be excluded
Example: from:amy (dinner OR movie) Meaning: Messages from Amy that contain
either the word "dinner" or the word "movie"

Example:
subject:(dinner movie)

Meaning: Messages in which the subject contains both the word "dinner" and the word "movie"
in:anywhereSearch for messages anywhere in Gmail*

*Messages in Spam
and
Trash are
excluded from searches by default
Example: in:anywhere movie

Meaning: Messages in All Mail, Spam, and Trash that contain the word "movie"
in:inbox

in:trash

in:spam
Search for messages in Inbox, Trash, or SpamExample: in:trash from:amyMeaning: Messages from Amy that are in Trash
is:important

label:important
Search
within messages that Priority Inbox considers important.
Example: is:important from:janet
Meaning: Messages from Janet that were marked as important by Priority Inbox
is:starred

is:unread

is:read
Search for messages that are starred, unread or readExample: is:read is:starred from:David  Meaning: Messages from David that have been read and are marked with a star
cc:Used to specify recipients in the cc: or bcc: fields*Example: cc:david
bcc:*Search on bcc: cannot retrieve messages on which you were blind
carbon copied
Meaning: Messages that were cc-ed to David
after:Search for messages sent during a certain period of time*Example: after:2004/04/16
before:2004/04/18
before:*Dates must be in yyyy/mm/dd format.Meaning: Messages sent between April 16, 2004 and April 18, 2004.*

*More precisely: Messages sent after 12:00 AM (or 00:00) April 16, 2004 and before April 18, 2004.
is:chatSearch for chat messagesExample: is:chat monkey  Meaning: Any chat message including the word "monkey".

Addendum (Nov 2012)

OperatorDefinitionExample(s)
size:Search for messages which is equal or greater than the size entered. Example: size:10M 
Meaning all messages that are 10 MB and above


Wednesday, October 20, 2010

Compiling Samba on Sun Solaris

This is a bookmark for my personal reference to this site.   I searched other sites and this is the one that works.

Main content that is important is as follow:


  1. Download and compile Samba from http://www.samba.org.
    Here KerberosOpenLDAP, and Samba will be downloaded and compiled.
    Samba will use the idmap_rid facility to map a single ADS domain SIDs to Solaris UIDs and GIDs. You should determine what idmap is suitable for your installation.
    Within this example the samba-highly-available-local-file-system is /local/samba, where the software is installed into /local/samba/software and compiled into /opt/samba.
    For more information using these filenames refer to the following deployment example in Deployment Example: Installing Samba from http://www.samba.org where these commands have been has been taken.
    1. Download, Extract and Install Kerberos.

      Vigor5# cd /local/samba/software
      Vigor5# wget http://web.mit.edu/kerberos/dist/krb5/1.4/krb5-1.4.3-signed.tar
      Vigor5# tar -xfBp krb5*tar
      Vigor5# gunzip -c krb5*.tar.gz | tar -xfBp -
      Vigor5# rm krb5*tar*
      Vigor5# cd krb5*/src
      Vigor5# CC=/opt/SUNWspro/bin/cc ./configure --prefix=/opt/samba \
      > --enable-dns-for-realm
      Vigor5# make
      Vigor5# make install
      
    2. Download, Extract and Install OpenLDAP.

      Note –
      You must obtain a fix for Bug ID: 6419029 which describes a problem when compiling OpenLDAP before proceeding with this step.


      Vigor5# cd /local/samba/software
      Vigor5# wget \
      > ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.3.24.tgz
      Vigor5# gunzip -c openldap-2.3.24.tgz | tar -xfBp -
      Vigor5# rm openldap-2.3.24.tgz
      Vigor5# cd openldap*
      Vigor5# CC=/opt/SUNWspro/bin/cc \
      > CPPFLAGS="-I/opt/samba/include" \
      > LDFLAGS="-L/opt/samba/lib -R/opt/samba/lib" ./configure --prefix=/opt/samba \
      > --disable-slapd --disable-slurpd
      Vigor5# make depend
      Vigor5# make
      Vigor5# make install
      
    3. Download, Extract and Install Samba.

      Vigor5# cd /local/samba/software
      Vigor5# wget http://us3.samba.org/samba/ftp/old-versions/samba-3.0.22.tar.gz
      Vigor5# gunzip -c samba-3.0.22.tar.gz | tar -xfBp -
      Vigor5# rm samba-3.0.22.tar.gz
      Vigor5# cd samba*/source
      Vigor5# CC=/opt/SUNWspro/bin/cc \
      > CFLAGS=-I/opt/samba/include \
      > LDFLAGS="-L/opt/samba/lib -R/opt/samba/lib" ./configure --prefix=/opt/samba \
      > --with-ads --with-krb5=/opt/samba --with-shared-modules=idmap_rid
      Vigor5# make
      Vigor5# make install
      
  2. Copy winbind libnss_winbind.so to /usr/lib.

    # cd /local/samba/software/samba*/source
    #
    # cp nsswitch/libnss_winbind.so /usr/lib
    # ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1
    # ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1

Saturday, October 9, 2010

Windows 7 secrets

You can enable Windows 7 GodMode with the following steps:


  1. Create a new folder
  2. Rename the folder as follow - GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}  (Make sure to type exactly.
  3. The create folder contains a lot of administration short cuts that are useful.

Wednesday, September 15, 2010

Unix Utilities for Windows

The following are utilities ported from Unix into Windows:

http://sourceforge.net/projects/unxutils/

Unlike other ports, it provides Unix functionalities natively in Windows.  One of the tools touch is used to update the date of the file is useful for those encrypted containers like OFTE so that the backup utilities detect a change and will perform backup.

Friday, September 3, 2010

Setting path in Unix and Windows

Display path
In order to check on existing path, do the following:

in Windows, just type:
echo %path%

in Unix, just type 
echo $PATH

Set path
To add additional folder to the path, do the following:

in Windows, 
for example, to add c:\t2 to front of the path, just do type the following:

set path=c:\t2;%path%

in Unix, if we want to add /usr/sfw/bin to the front of the path, it is a two step process, type:

PATH=/usr/sfw/bin:$PATH
export PATH

to verify type the display path shown above.

Additional Note
A reminder, the paths are evaluated from left to write.  In both Windows and Unix, when we try to execute any program, it will first search for the application in the current folder, then it will traverse the path from left to right.

Tuesday, June 8, 2010

Xmind vs FreeMind

Mind mapping is a great way to organize my thoughts and I found FreeMind does a great job in doing that.  However, recently I came across Xmind.  I used the free version and found that it provides some features that were missing from FreeMind.

The following are the missing features:

Floating Topics/Floating Central Topic


This allows you to create multiple central centers.  As shown below:








Different Structures


Xmind allows you to shape your mind map into different structures (in addition to the standard map available in Freemind) such as:

  • Fishbone.
  • Spreadsheet
  • Org Chart
  • Logic Chart
This is great except, the nodes below will inherit the structure of the node below.  So I was not able to mix the different structures.

Different Shapes

It is nice to be able to change the different shapes of the nodes.   In additional to the standard Elipse, you can have:
  • Rounded Rectangle
  • Rectangle
  • Diamond
  • Call out
  • Fish head
  • Underline
Here are some examples:


Workbook

In Freemind, you can only have one worksheet while in Xmind, you are able to save multiple worksheet as a workbook.

This is useful if you want to separate multiple ideas in a file.

Outline View

There is an outline view that will allow you to view which nodes are at the same level.  

Negatives

There are a few complaints that I have of Xmind.  They are:

  • Due to the additional features, the installer is substantially bigger.  Freemind is 7 Mbyte, Xmind is 50 Mbyte.
  • It is also compared to Freemind.

Monday, May 3, 2010

notification dll is not available

I recently encountered the following error on my Windows 7.  I do not know what caused the error and searched the web.  One of the solution was to register notification.dll.  However, I was not able to find such a file. 

There was also another option which was to reinstall Windows - from the Dell support (again listed on the web). 

Finally, I decided to go through the services and disable "Broadcom Wireless LAN Tray Service".  It seems to do the trick.  I do not encounter the problem when I boot up my notebook.  Hopefully it does not cause other problems.

Tuesday, April 13, 2010

Query LDAP using JNDI

The following is the best example I found that illustrates how to query LDAP using JNDI (in Java).  The code is found here.

One of the key things I found when writing the code is sometimes the attribute that we want may have a null value.  This can be handled by enclosing the code using a try ... catch.

import javax.naming.*;
import javax.naming.directory.*;
import java.util.Hashtable;

public class SimpleQuery {

    public static void main(String[] args) {

        if (args.length != 2) {
          System.out.println("Syntax: SimpleQuery query attribute");
          return;
        }

        String query = args[0];
        String attribute = args[1];
        StringBuffer output = new StringBuffer();

        try {
            String url = "ldap://directory.cornell.edu/o=Cornell%20University,c=US";
            Hashtable env = new Hashtable();
            env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
            env.put(Context.PROVIDER_URL, url);
            DirContext context = new InitialDirContext(env);

            SearchControls ctrl = new SearchControls();
            ctrl.setSearchScope(SearchControls.SUBTREE_SCOPE);
            NamingEnumeration enumeration = context.search("", query, ctrl);
            while (enumeration.hasMore()) {
                SearchResult result = (SearchResult) enumeration.next();
                Attributes attribs = result.getAttributes();
                NamingEnumeration values = ((BasicAttribute) attribs.get(attribute)).getAll();
                while (values.hasMore()) {
                  if (output.length() > 0) {
                    output.append("|");
                  }
                  output.append(values.next().toString());
                }
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.print(output.toString());
    }

    public SimpleQuery() {}
}

Sunday, April 11, 2010

Computing and Displaying elapsed time In vb.net

To compute the elapse time, get the snapshot of the time at the beginning, using Now.TimeOfDay (as shown below) and then substract from the same when it is time to display the elapsed time.

         Dim prgStartTime As TimeSpan = Now.TimeOfDay
         Dim eTime As TimeSpan = Now.TimeOfDay.Subtract(prgStartTime)

         Console.WriteLine("Elasped Time " & eTime.ToString)

Saturday, April 10, 2010

Computing and Displaying elapsed time In Java program

To do that capture the start using a long variable as shown below and then compute it against the currentTimeMillis to display.

In the example below, I am displaying in Second.

public static void main(String[] args) {

        // Initialize some parameters
        long stTime = System.currentTimeMillis();
        System.out.println("Elapse time: " + ((System.currentTimeMillis() - stTime) / 1000));
        System.out.println("End Program");

    }

Friday, January 22, 2010

IE Tab vs IE View

Many users prefer to use FireFox most of the time but occasionally encounter sites that only work with IE.  For these people they have two options:

IE Tab
IE View

Different Approaches

Both add on allows you to run IE but approaches it differently.  For IETab, it runs within a Firefox Tab but for IE View, it will redirect your page to a new IE Window. 

IE Tab


Running the sites with a IE Tab may not work all the time since some of these websites may have problems launching the pop up Window.    Also IETab will actually send two post to the server (1 from IE and 1 from Firefox).  I found this out by accident while doing some test on one of my applications.

One nice thing about IE Tab since it launches within the tab, it is much cleaner.

IE View

IE View will launch the a separate IE Window  for the sites you want to run in IE.  Problem with this approach is it will keep launching new windows - even though the newer IE can do tabs, so you will end up with many windows.

Since you are running in an actual IE window, you will not have the problem of failure that was described in IE Tab above.

White List

White list is a list of websites you maintain either within IE Tab or IE View.  This list is used to identify sites that should run in IE.  When those sites are used, Firefox will automatically pass the control to either IE Tab or IE View.

To maintain the list in IE Tab, you just need to click on Tools -> IE Tab Options.

In IE View, you need to
  • go to the Add-on window (accessed via Tools -> Add On)
  • Click on the IE View and then select the Options


One warning, if the site identified in the IE View white list is the default homepage that FireFox will go to when it starts up, you will never ever get to FireFox.  This is because as soon as Firefox starts, it will go to the site and then pass the site to IE after which Firefox will exit.

The workaround is to create a short cut to a website that is not in the whitelist and then change the default home page or remove that site from the white list.

The short cut should contain something like:

"C:\Program Files\Mozilla Firefox\firefox.exe" http://www,yahoo.com


Side Note:

I just saw that there is going to be a version of IE Tab for Google Chrome.  Unfortunately, it will only install on Chrome beta.

Saturday, January 16, 2010

Restricting Login Times - Update

In my previous article, I described how you can set the time restriction on the account.  However, there are some caveats.

Windows XP
In Windows XP, the set time will prevent the login outside the allowed time but it will not logout the account if it was logged during the allowed time.  To overcome this, you need to download psshutdown utility (a freeware).  It is part of the psutils found here.  Once done, you can then create a batch job containing at least the following command:

psshutdown -o -f

Then schedule the above batch job to run during the end time of the time restriction.  The problem with this approach is that it will also force exit those accounts that are not restricted.

Windows Vista

The time restriction is built in.  Unfortunately, it locks up the screen without exiting any of the application.  This may cause problems if you happen to log into a site that restricts the number of sessions since you are still logged in but have no way of getting back in to log out or properly save your work (short of opening up the parental guide.