Skip to content

Instantly share code, notes, and snippets.

View RickStrahl's full-sized avatar

Rick Strahl RickStrahl

View GitHub Profile
@RickStrahl
RickStrahl / CheckForMarkdownMonster.cs
Created December 19, 2016 10:54
Sample that demonstrates the difference when running Visual Studio debugger in 32 bit instead of 64 bit as expected.
string mmFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),"Markdown Monster");
string path = sk.GetValue("Path").ToString();
if (!path.Contains(mmFolder))
{
var pathList = path.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries).ToList();
pathList.Add(mmFolder);
path = string.Join(";", pathList.Distinct().ToArray());
sk.SetValue("Path", path);
}
@RickStrahl
RickStrahl / gist:204de6f9e6607b79010f5e7648b0d1a7
Last active September 12, 2016 03:42
Angular 2 HttpClient Wrapper Problems
import {Injectable} from "@angular/core";
import {Http, RequestOptionsArgs, Response} from "@angular/http";
import {UserInfo} from "./userInfo";
import {CatchSignature} from "rxjs/operator/catch";
import {Observable} from "rxjs";
/**
* Wrapper around the Http provider to allow customizing HTTP requests
*/
@Injectable()