Gmail Signature Plugin to display Recent Blog Entries

My current email signature at the bottom of my emails has a link to this blog.  However what I would really like is a link to my blog followed by the title of two or three of my most recent posts.  I could certainly do this manually, however it would be nice and quicker if Gmail could do this automatically.  I though about it and there are at least a few ways I can get this done:

  • Make a suggestion to the Gmail Labs program (http://groups.google.com/group/gmail-labs-suggest-a-labs-feature/browse_thread/thread/925279280fcdfa2f#)
  • Search Google (Find out about the Feedburner Headline Animator which makes an animated image like below)
  • Make a GreaseMonkey script (would only work when using Firefox with GreaseMonkey enabled)
  • Make a bookmarklet that does this or at least copies the signature to my clipboard for quick pasting into my email

One of the great things about the web is that if you want something you can usually just do it or find someone who has already.

Example of the Feedburner Headline Animator.  I would prefer plain text for my emails.  Lazyweb if you know of a good way to do this let me know.

Tech Opener

Posted in tools | Tagged , , | View Comments

Table Sorting with JQuery

A very common request for HTML tables is making them sortable.  The requirement came up the other day and I used JQuery and the JQuery Plugin tablesorter.  JQuery is a excellent lightweight javascript library that is useful for all things javascript.  It also allows its large developer community to develop plugins such as the tablesorter plugin.  To use this in your web application, insert the lines below and you are all set.  It does not get much easier than that, plus it is really fast, has customization options, and just plain works.

<script type="text/javascript" src="/path/to/jquery-latest.js"></script>
<script type="text/javascript" src="/path/to/jquery.tablesorter.js"></script>
$(document).ready(function()
    {
        $("#myTable").tablesorter();
    }
);

One requirement is that the HTML table must use the THEAD and TBODY tags.  A .NET GridView does not include these tags by default, but they can be added easily enough with the following:

if (this.gridView.Rows.Count > 0)
{
gridView.UseAccessibleHeader = true;
gridView.HeaderRow.TableSection = TableRowSection.TableHeader;
}

Posted in development | View Comments

Stackoverflow will answer all your programming questions

stackoverflow

Lately I have been doing more .NET development and ultimately at some point you get stuck, forget how to do something, or wonder what the best practices for something is.  You immediately run a few google searches and get back some articles on a bunch of weird answer sites.  Recently a new site for asking questions started with a really good and unique design.  If you have not ran across it already, I highly recommend taking a look.  StackOverflow.com is a mix between wikis, blogs, forums, and digg for programming questions and answers.  Even though it is fairly new, it already has a great community and lots of content.  Many languages and topics are covered even though the community, founders, and the site itself are primarily .NET based.

They also run a great blog and podcast where they talk about the site and how they developed it.  They are off to a great start, and they are looking to start a similar site oriented towards IT Centric version soon.  These guys get it.

Posted in development | Tagged | View Comments

How to migrate users in Oracle Webcenter Interaction

Webcenter Interation provides great tools for importing users from external user directories.  Depending on your user directory and configuration you set a unique identifier to use that is often not the username.  I have ran across a few senarios in which you want to switch to a different user directory without losing any user settings or preferences.  

Most commonly, you might have a production Active Directory server that a production portal syncs with and a development server that syncs with a development Active Directory server.  Now lets say you migrate your production portal database to your development environment.  There are a number of items you have to fix for it to operate in this new environment.  Take a look at ALUI Administration Tool for Environment Refresh: String Replacing for URLS for more information regarding syncing environments.  For the purpose of this post, we are just concerned about the users and keeping their settings, preferences and security throughout the portal.

In our case, a users Active Directory ObjectGUID is their unique identifier and by definition this is different in each Active Directory server (unless they are in the same domain of course).  So if we just sync with the development Active Directory server, the portal would delete all of the users and then recreate them even though the usernames are the same.  Below are some steps I have successfully used in the past to avoid deleting these users by migrating them to the new authentication source.  Your results may vary, and I do not offer any guarantees so certainly test this procedure thoroughly if you find yourself in a similar situation.

  • Backup the database before starting incase something goes wrong.
  • Lets assume the existing authentication source id = 201
  • Create a temporary authentication source used for migration.  Lets assume its id = 202. 
  • Configure both of these authentication source to point to the development Active Directory server.
  • Run the sync job only for auth source 202.
  • Run the following SQL script which generates another SQL script that will update the settings of users of the 201 auth source in the PTUSERS table to match those of the 202 auth source.
SELECT 'UPDATE PTUSERS SET AUTHUNIQUENAME=''' + AUTHUNIQUENAME
+ ''', DESCRIPTION=''' + DESCRIPTION
+ ''', AUTHUSERNAME=''' + AUTHUSERNAME
+ ''' WHERE MAPPINGAUTHNAME=''' + MAPPINGAUTHNAME
 ''' AND AUTHSOURCEID=201;'
FROM PTUSERS
WHERE AUTHSOURCEID=202;
  • Verify the script that it generates escapes any apostrophe characters and then run it.
  • Run the following SQL script which generates another SQL script that will update the settings of groups of the 201 auth source in the PTUSERGROUPS table to match those of the 202 auth source. 
SELECT 'UPDATE PTUSERGROUPS SET AUTHUNIQUENAME=''' + AUTHUNIQUENAME
+ ''', DESCRIPTION=''' + DESCRIPTION
+ ''', SYNCHGROUPNAME=''' + SYNCHGROUPNAME
+ ''' WHERE MAPPINGAUTHNAME=''' + MAPPINGAUTHNAME
+ ''' AND AUTHSOURCEID=201;' 
FROM PTUSERGROUPS
WHERE AUTHSOURCEID=202;
  • Verify the script that it generates escapes any apostrophe characters and then run it.
  • Delete the 202 auth source.
  • Run the 201 auth source sync job.
  • Verify that users you expected not to be deleted, were not deleted.

The PTUSERS table contains some CRC fields, which are based upon all of the fields in a PTUSER record.  The easiest way to update these CRC values for a user, is to save the user using the portal UI or API.  In the past I have written a script that loops through each user in the authentication source and saves them, thus updating the CRC fields, however I can not find it.  I will leave this part as an exercise for the reader.  Just keep in mind that you will need this before the user will be able to authenticate properly.  Although it does seem like the .NET portal relies on the CRC values more so than the Java portal version.

As a side note, I am using the SyntaxHighlighter Plus wordpress plugin to provide the syntax highlighting.

Posted in development | Tagged | View Comments

HTC Touch Pro with Sprint

My company provides me with a mobile phone, and we just switched carriers from AT&T to Sprint.  Along with this, I got the HTC Touch Pro.  It has everything my old HTC 8525 had including WiFi, a slide out keyboard, exchange integration, and a touch screen.  Some new features include GPS, Windows Mobile 6, Sprint Music and TV, and a slicker look and feel.

I immediately downloaded (which was super quick) and installed the following windows mobile applications:

  • Google Maps even includes street view now on the mobile and works great with integrated GPS.
  • Qik does video streaming.  I have not used this before, but I hear good things and want to try it out.
  • Yahoo! Go

I have not tried it yet, but at some point ill probably break down and buy WMWifiRouter as it sounds too useful when traveling.  Also Windows Live Search was already installed, which has a great Speak feature for searching.

What windows mobile apps do you recommend?  Oh wait, I forgot, everyone uses the iPhone now!

Posted in tools | Tagged | View Comments

Workaround SSL cert warnings with stunnel

On occasion I find myself attempting to programatically make a HTTP request over SSL, however it gives connection warnings such as expiration or name mismatch which causes the request to fail.  You could update the server certificate, however this can be a pain.  An alternative is to use stunnel.  Install it, set it up to accept traffic on a port and then forward that traffic to the SSL site.  Your client can then connect over http to the stunnel port, and stunnel will forward this request to the SSL site ignoring the warnings.  There are a number of other uses for stunnel, so check it out, if your working with SSL.

http://www.stunnel.org/

Example config file below:

client=yes
verify=0
[psuedo-https]
accept  = 8080
connect = yourhost:443
TIMEOUTclose = 0

Posted in development, tools | View Comments

Free Meals for your Birthday

Today is my birthday and below are a few restuarants that I enjoy eating at around this time.  If you sign up for thier newsletter they will email you a certificate for a free meal around your birthday.

Afterwards top it off with a free ice cream from Cold Stone Creamery.

You might get a few emails throughout the year with other advertisments, but it is well worth it.

Posted in Uncategorized | Tagged | View Comments

No car, no problem

So my trusty 1992 Buick did not pass the State Inspection this year.  Who knew that the driver side power window needs to be fully operational?  Anyhow, to make a short story shorter, I have decided not to fix my car (at least not right now).

I would like to wait for an electric car to come out before buying a new one.  Perhaps a Chevy Volt, or a possible plug-in hybrid Toyota Prius, but they seem to be at least a year or more out.

So until something changes, ill be depending a lot more on the metro system for my daily commute to work.  Today I took the Metro Bus to Tysons Corner for the first time.  It uses your SmartTrip card, runs frequently, was well heated, and even announces and displays the next stop (like airport shuttles).  It does add a half an hour each way and I need to walk a little bit more, but overall it is great.  Certainly much easier and convenient that I first expected.

WMATA also updated their website today.  If you haven’t used it recently, check it out.  You can email trip itineraries to yourself and there are also direct links to Google Maps walking directions.

Posted in green | Tagged | View Comments

Best Tool for Screencasting is Jing

 

jing-logoIf you ever need to capture video of your desktop with sound or take a bunch of quick screen shots, check out Jing.  It is free, easy to use and just works.  In the future I will be posing some screencasts of various products using this tool.

Posted in tools | View Comments

Sharepoint development .NET build events

When developing .NET applications, particularly Sharepoint applications you might find yourself updating the GAC (Global Assembly Cache) and restarting IIS a lot.  This can be time consuming if you are making a lot of short interations in your development cycle.  Below are two steps you can take to automate this and minimize your wait time.

First instead of restarting IIS using iisreset, we can restart just the app pool we are working with.   Just add the following commands to you pre build event of your project.  I add it to the pre-build instead of the post build, because if I attempt to build before restarting the app pool then it will often error complaining that .NET has it locked.  In order to give the restart command time to run before the build starts, the next command functions as a wait for 5 seconds.

cscript c:\windows\system32\iisapp.vbs /a “SharePoint – 80″ /r

ping -n 5 127.0.0.1 > NUL 2>&1

When needed, I also update my project post build event to add my new dll to the GAC with this command.

gacutil -if “$(TargetPath)”

You can find gacutil.exe under C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 (you dont have to be using 1.1) and move it to c:\windows\system32 so that it can be found.

buildevents

Posted in development | Tagged , | View Comments