Git Credentials Helper

While working with git and GitHub it can often become annoying to always have to type in credentials when dealing with remote repositories. Thankfully GitHub has suggestions for Mac, Windows and Linux. For those of you who don’t care for the link, heres a summary: Mac: There’s more than one step involved: Check if osxkeychain is setup: git credential-osxkeychain git config credential.helper osxkeychain Windows: git config credential.helper wincred Linux (and actually for all of them if you prefer a generic way): git config credential.helper cache All of the above will set up the credentials for the specific git directory you are working on. If you would Continue reading Git Credentials Helper

Creating a Safer Guid

Guids (Globally Unique Identifers) are great. They are very useful when uniqueness is important, maybe for identification later on. They are fairly efficient to create and are even human readable. So yeah, Guids are pretty great… except when they aren’t. A common use case for a Guid (for me at least) is to receive it as a set of characters and then convert it to an actual Guid (in C#). This usually looks like this: public void CallWithGuidAsString(string guid) { Guid newGuid = new Guid(guid); // Do stuff with guid. } The issue with this is that it is not Continue reading Creating a Safer Guid