Getting Moment.js to Work with Angular 6 and Higher

One of the reasons I blog here is so that I'll have an easy way to find things I needed to figure out, so that I don't need to figure them out again. And I really do need to keep that in mind. Today, a co-worker of mine asked me for help getting Moment.js to work with an application using Angular 7. Before I could find a solution, he found one already in the code in a different area.

When I looked at the file in question, I'd written it (sigh). I didn't remember the problem (or the solution) until seeing the file again. At the time, I'd been trying to get Moment.js to work with Angular 6. Here's the simple solution:

//Moment doesn't want to behave in Angular 6. Here's the workaround. import * as moment_ from'moment'; const moment = moment_;
And then you just the use moment constant like this:

payload.birthDate = moment(profile.birthDate).toDate();
I think I probably found this solution on Stack Oveflow, so I can't really take credit for…

I Love The Cheesy Hallmark Channel Christmas Movies

(Updated 12/2/2018)

I have a soft spot for TV, movies, and music that are considered...let’s say less than the best. Sometimes entertainment that is unintentionally bad is more enjoyable to me than something comparatively decent. And the Hallmark Channel Christmas movies fit that bill for me.

Are they bad? Well, not really. But they’re incredibly cheesy (IMHO). I watched them every chance I had during last Christmas season, and this year I plan to do the same. Here are the reasons I find these movies so cheesy, and why I love them so much.
They’re essentially Lifetime movies - Okay, now stay with me here. There’s nothing wrong with Lifetime movies, and I don't want to give you the wrong impression. It's just that these movies follow the same general formula: the lead character is female (either a professional or a small business owner), the story deals with romantic relationships, and the male lead is unrealistically perfect and the type of guy that makes us real-life guys look…

It Came From the '70s: The Ethel Merman Disco Album

From the "Who Really Thought This Was a Good Idea?" department comes The Ethel Merman Disco Album. I went spelunking for bad albums a week or so ago and found this, released back in 1979. I'd heard of it before but this is my first time listening to it and...gee, where to begin?

According to the Wikipedia article, each of the songs was recorded in just one take with Ms. Merman's usual vocal arrangement, with the disco instrumentation added later. Also, there were apparently 14 songs recorded for the album, of which only 7 made the cut (with an additional being included with a CD reissue). That means there are 6 unreleased songs from this. I'd love to hear them. The album is available on iTunes, but without the CD bonus track.

The album is typical of the genre, if that genre is Celebrities Releasing Music Outside of Their Wheelhouse. In some cases music itself is outside of the celebrity's wheelhouse, but Ms. Merman was an established singer. Still, this fora…

“Speak, Centurion.”

I have a friend who likes to send me random things through the mail from time to time, the most recent of which was the Imperious Leader action figure from the original 1978 Battlestar Galactica shown above. I decided to bring it to work and put it in my office. One day, after returning to my office from a meeting, I found that someone (my boss, it turns out) had constructed a throne for him using two paper cups. It’s surprisingly film-accurate, IMHO. My boss later admitted that he considered coloring it black with a marker but decided it wouldn’t be a productive use of time.

Positive Vibes

Sometimes a bad day can be turned around by an unexpected source. Last Wednesday I was having a pretty terrible day after being jerked around by a local car dealership. Later that day, while on a live chat with iTunes support about a missing digital booklet, I was helped by a guy named Kumar who couldn't have been more helpful and positive. What had begun as a chat session to help me with a missing content problem turned into a dose of positive attitude that I really needed that day. Thanks Kumar!

Tales from the Whiteboard 2

As mentioned in a previous post, I often have people stopping by my office when I'm not here and leaving (often humorous) messages on my whiteboard. Here is another collection of messages I've had left for me over the previous few months.

I don't get the wonderwall comment, but I found it funny nonetheless.

A coworker left a message requesting assistance as if I'd written it as one of my own notes.

A later addition, wishing me a nice trip up to Boston (for Visual Studio Live).

I honestly am at my desk regularly, but apparently I have a knack for missing someone's visits.

Resolving the "Authentication failed" Error with Git for Windows

Today I tried to clone a repo with Git but received the error "fatal: Authentication failed for (URL)". I wasn't sure why I was getting this error when everything was working fine last week. Then I realized that I'd had to change my domain password yesterday, and my stored credentials needed to be updated.

To do so, on Windows 10, right-click on the start button and select Control Panel. Then select Credential Manager. From there, select Windows Credentials and find your Git URL under the Generic Credentials section shown below.

Click on the URL or the arrow to the right of it to view the information associated with it. Click Edit to change your stored password.

I hope this helps!