Skip to content

Instantly share code, notes, and snippets.

static readonly string[] videoCardBlacklist = {"8086:0116"};
static void DisableHwRenderingForCrapVideoCards()
{
if (!String.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("MY_VIDEO_CARD_REALLY_WORKS")))
{
return;
}
int osVersion = Environment.OSVersion.Version.Major * 100 + Environment.OSVersion.Version.Minor;
if (osVersion < 601)
@praeclarum
praeclarum / ListDiff.cs
Created November 5, 2011 14:42
Finds a diff between two IEnumerables
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.IO;
namespace Algorithms
{
/// <summary>
/// The type of <see cref="ListDiffAction{S,D}"/>.
@tpope
tpope / .inputrc
Created September 8, 2011 16:43
Basic amenities for vi readline bindings
set keymap vi-insert
Control-a: beginning-of-line
Control-b: backward-char
Control-d: delete-char
Control-e: end-of-line
Control-f: forward-char
Control-k: kill-line
Control-n: next-history
Control-p: previous-history
set keymap emacs-ctlx