Get rid of the Language Bar in XP for good!

February 2, 2010 04:29 by bjones

I'm running Windows XP and I only have 43k pixels on my toolbar without extending it to two or more lines.  I only speak, read and type in English (I'm sure that sentence alone speaks loudly about the education in the US) which means I don't need to lose 10% of those pixels to a language bar.  If you right click on the task bar and go to toolbars, you will see a selection for "Language bar".  Deselecting that will make it go away until you reboot and it comes back!  How do you permanently get rid of it?  Here's how:

 

  • Go to your control panel and make sure you are in classic view.
  • Open up the "Regional and Language Options"
  • Select the "Languages" Tab at the top
  • Click the "Details" button in the "Text services and input langauges" box
  • Click the "Langauge Bar..." button in the bottom "Preferences" box
  • Uncheck "Show the Language bar on the desktop"


That's it! 

 

Now I have extra room to have IE, Firefox, Chrome and Safari all in my quick launch bar ;)  I'll save my rant about all the different browsers for another day.

 

 

 


Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: ,
Categories: SysAdmin
Actions: E-mail | Permalink | Comments (3) | Comment RSSRSS comment feed

Sending email through GMail (or Google apps) with C#

May 29, 2009 05:18 by bjones

I have a couple of websites I've built that use GoDaddy hosting.  Instead of paying GoDaddy for their email service for my domains, I use Google Apps. It's free, they keep increasing the amount of storage (7GBs as of this blog) and I like the search feature.  In addition, I don't want to have my emails bounce as SPAM because I'm relaying it off GoDaddy's open relay so I'm bouncing it off of smtp.google.com.  Don't forget to add an SPF record (maybe I'll make that part 2 of this article).

I've been using System.Net.Mail to bounce email off a local SMTP host but had to go back to System.Web.Mail in order to authenticate for Google (my tin foil hat personality would suggest that Microsoft deprecated System.Web.Mail and left out authentication on System.Net.Mail to stop us from using Gmail). 

Below is a function I use to send email through GMail in my C# web apps.  The original code was written by Alex Sanchez for bouncing it off your local (or remote) mail server without authentication; I bastardized it to add authentication.


I have a typo in the Param section for the inFrom.  I couldn't figure out how to excape a < or > so I had to leave them out.  Make sure you use this format for your inFrom: "Name To Display" <email@domain.com>.  

Here you go: 

[code:c#]

/// <summary>
/// Sends email using Gmail or Email for Google apps.
/// </summary>
/// <param name="inFrom">From email addresses - format is: "Name To Display" email@domain.com </param>
/// <param name="inTo">To email addresses</param>
/// <param name="inSubject">Subject line</param>
/// <param name="inBody">Body of email in html markup or plain text</param>
/// <param name="inAttachmentPaths">String array of attachment paths on webserver</param>
/// <param name="isHTMLFormat">1 = HTML Format, 2 = plain text</param>
/// <param name="gmailAccountName">Account name for Gmail.  If you are using Email for Google Apps, you need to supply full email: email@domain.com</param>
/// <param name="gmailPassword">Password for your gmail account</param>
public static void SendEmailViaGmail(string inFrom, string inTo, string inSubject, string inBody, string[] inAttachmentPaths, Boolean isHTMLFormat, string gmailAccountName, string gmailPassword)
{
    System.Web.Mail.MailMessage myMailMessage = null;
   
    // Build email message
    myMailMessage = new System.Web.Mail.MailMessage();
    myMailMessage.From = inFrom;  // Format is: "Name To Display" <email@domain.com>
    myMailMessage.To = inTo;
    myMailMessage.Subject = inSubject;
    myMailMessage.Body = inBody; 
   
    if (isHTMLFormat)  // I send in plain text for SMS messages, HTML for the rest of the world
    {
        myMailMessage.BodyFormat = MailFormat.Html;
    }
    else
    {
        myMailMessage.BodyFormat = MailFormat.Text;
    }
   
   
    // Add attachments
    if (inAttachmentPaths != null)
        for (int i = 0; i < inAttachmentPaths.Length; i++)
            myMailMessage.Attachments.Add(new Attachment(inAttachmentPaths[i]));
   
   
    //  Authenticate
    myMailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1);
    // Username for gmail - email@domain.com for email for Google Apps
    myMailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", gmailAccountName);
    // Password for gmail account
    myMailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", gmailPassword);
    // Google says to use 465 or 587.  I don't get an answer on 587 and 465 works - YMMV
    myMailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "465");
    // STARTTLS
    myMailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", true);
   
   
   
   
    // assign outgoing gmail server
    SmtpMail.SmtpServer = "smtp.gmail.com";
    SmtpMail.Send(myMailMessage);
}

[/code]


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: SysAdmin | .net | Code Monkey
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

Fizzbin

May 1, 2009 10:56 by bjones
This post is only for geeks - you know the guys that live to sit in front of two (or three or better yet, four!) monitors pouring over a stack trace to find out why "is null" and "= null" aren't the same. Or for you sysadmins spending 2 days checking 5,000 cable drops to find out who created a loopback with the $5 linksys hub that brought down your entire network. If you fit one of these categories then fizzbin to you!

Imagine this scenario: You spent the last 16 straight hours working on a 52 node Beowulf cluster and you decide to go home while the final node is coming up. "I'll check it at home," you think to yourself. You get home, down a bottle of bawls and fire up your Macbook to find out that your internet connection is down. You get an IP, ping to your router but nothing further. Dang it, sun spots are wreaking habit again so you pick up the phone and call your ISP. Level 1 support gets on and starts asking you if you turned on your computer and is there a light on your modem? There is no need to talk to level 1 but they won't transfer you until you pretend to disconnect your wireless router and plug your computer (that you lied and said was XP so they would help) directly in to the cable modem. Reboot, wait, unplug cables, wait, unplug modems, wait, etc...

It's time to put an end to this frustration. Yes, my Mom needs to go through each step but, we geeks don't. Scott Hanselman has come up with an ingenious way for us to wink at the support tech on the other end of the phone and get us on to some real troubleshooting on their end. Fizzbin! It's a secret codeword that we can use to get past the mundane troubleshooting. It's so simple to use, just say "fizzbin" and the level 1 techie will know that you've already done everything she is going to asking you. And everything her level 2 techie is going to ask you so you both stop wasting each other's time. It will only work if we all know it, so pass it on!

Fizzbin to you!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: SysAdmin
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

Windows Mobile 6.1 and Activesync not working - fix

December 2, 2008 07:52 by bjones

For months my phone refused to sync with ANY computer.  I plug it in, it loads the drivers and then nada.  Activesync can't see the phone on any computer.  I'm also using wireless Activesync to sync up my email at work through Exchange 2003.  I googled around and couldn't find a definative fix so I followed them all.  Upgrades, downgrades, hacks and even dancing around singing Joy To The World while rubbing my belly.  Nada!

I did stumble across someone saying something about having more than 100 contacts in Outlook.  Well, I had my phone plugged in and Activesync sat there with it's defiant grey "not connected" symbol laughing at me.  I started to delete old contacts and merging some (do I really need 5 separate contacts for one person??) and after a few the Activesync turned to a happy green and started it's hypnotic spin.  Viola!  

So the fix is keep your contacts under 100.  Since I'm at 99, I'm not allowed to meet anyone ever again - I think I'll be OK with that.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: SysAdmin
Actions: E-mail | Permalink | Comments (3) | Comment RSSRSS comment feed

JE CAAT Scripts - Ernst and Young (Solomon)

September 29, 2008 05:26 by bjones

Earlier today (5 minutes ago?) I blogged about Oracle Financials JE CAAT and gave away the necessary scripts to build the files.  Now I'm going to do the same for Solomon. 

As stated in the Oracle blog - these scripts work for us.  I offer no guarantees or warranties of any kind.

Don't forget to replace the year and the company id below.More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Code Monkey | SysAdmin
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

JE CAAT Scripts - Ernst and Young (Oracle Financials)

September 29, 2008 05:04 by bjones

It's that time of the year again, SOX audits.  There is nothing more I dread than audits; they suck all the fun out of work.  Our audit team is Ernest and Young.  A few years ago they started to require us to give them a listing of all journal entries and monthly trial balances for the year.  They take the beginning balance, roll it forward through the JE dump and make sure it matches the ending balance.  They also use it to look for any abnormalities in the numbers.  Obviously this is good for everyone expect for the poor IT guys that have to figure it out.

Get the Oracle scripts after the jump.More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Code Monkey | SysAdmin
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

SQL Stored Procedure with Dynamic Where

September 26, 2008 11:26 by bjones

I'm working on a website that will be unveiled in the next few weeks.  Yearly revenue will probably bring in something between bupkis and zilch; not quite Google's numbers yet.  The site is written in C# with MS SQL 2005 on the backend.  I'm trying to conserve the limited bits and bytes in the universe and wanted to make my code as reusable as possible. 

For the sake of an example, we'll say this site allows person A to send something to person B.  Person A should be able to log in to the site and see everything they sent to A.  They should also be able to see everything someone else (person C) has sent to them.  The same query is used but the where clause is different.  I don't want to type the stored procedure twice, and I certainly don't want to maintain it twice so I went searching for a dynamic where statement within a stored procedure and I present to you my geeky friends the answer: COALESCE

Find out how to do this after the break....More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Code Monkey | SysAdmin
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

HP Laserjet P2015 Driver Hell!

April 7, 2008 09:16 by bjones
I plugged in a HP LaserJet P2015 via USB to my windows XP SP2 box.  It started to load the driver and failed asking for a file: hpc20155.xml.  I uninstalled drivers for USB printer support, downloaded ever driver from HP and nothing would get it passed that point.  Google turned up 279 hits for that file name and none had a solution, all just rants about how worthless HP support is.  Neither HP or Microsoft searches turned up anything.  I took maters in to my own hands and fixed the problem.  I'm posting it here so there hopefully others will avoid the hassel of figuring it out.

You have to end a .inf file from Microsoft to get it to work.  Open up c:\windows\inf\oem16.inf in your favorite text editor.  Search for "hpc20155.xml" and you will find this section:

;hp LaserJet 2015 files
[DATA_FILES_20155]
hpc20155.xml,,,0x00000020
hpzsc43e.dtd,,,0x00000020
hpc20155.gpd,,,0x00000020
hpc2015b.ini,,,0x00000020

Change  hpc20155.xml,,,0x0000002 to hpc2015.xml,,,0x00000020  (take out the last 5 in hpc20155.xml).  Save it and go back to add a new printer in windows.  This should fix the problem. 

Now, how is my grandma supposed to figure something like this out?


Currently rated 4.0 by 3 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: SysAdmin
Actions: E-mail | Permalink | Comments (74) | Comment RSSRSS comment feed

Fast File Copy - Linux!

January 25, 2008 07:49 by bjones

 

All good ideas come out of necessity.  We were cloning an instance of Oracle Financials from one server to another.  There are a LOT of files under < 1k and the copy takes forever.  Yesterday the copy was kicked off using SCP - there was 39GBs to copy over a gigabit switch.  This should have been less than 10 minutes but actually took over 8 hours because of all the small files.  The copy failed and we needed to fix the problem and copy it a lot faster (30 minutes) today.

 

 After clearing up 10 GBs of log files, we were left with hundreds of thousands of small files that were going to slow us down.  We couldn't tarball the file because of a lack of space on the source server.  I started searching around and found this nifty tip that takes our encryption and streams all the files as one large file:

This requires netcat on both servers.

Destination box: nc -l -p 2342 | tar -C /target/dir -xzf -
Source box: tar -cz /source/dir | nc Target_Box 2342

It's been about 4 minutes and I'm already 1/3 of the way done!


Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Code Monkey | SysAdmin
Actions: E-mail | Permalink | Comments (9) | Comment RSSRSS comment feed