Skip to content

Instantly share code, notes, and snippets.

View davidwhitney's full-sized avatar
🍸
You're all wonderful. That's what's happening.

David Whitney davidwhitney

🍸
You're all wonderful. That's what's happening.
View GitHub Profile
@davidwhitney
davidwhitney / LICENSE.txt
Last active October 7, 2019 21:14
A Tiny Typescript mocking... um... library? class? That doesn't annoy me, and doesn't cause Typescript linters to get confused or fill your code up with :anys. The license is MIT.
Copyright (c) 2019 David Whitney
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@meadsteve
meadsteve / oops.js
Last active August 29, 2015 14:25
unicode vs javascipt coder sanity
var a‌a = "first assignment";
aa = "second assignment";
console.log(a‌a == aa);
type Element =
| E of IWebElement
let byId s (Element e) = e.GetElementById s
let byCss c (Element e) = e.SelectElements c
let interaction = Element -> unit
let click (Element e) = e.Click()
val bindPM<'a> : Element -> 'a
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@davidwhitney
davidwhitney / Settings.cs
Created March 20, 2013 01:00
Html Helper to support CDN Url.Content locations in ASP.NET MVC
public class Settings : ConfigurationSection
{
[ConfigurationProperty("enabled", DefaultValue = "false", IsRequired = true)]
public bool Enabled
{
get { return (bool)this["enabled"]; }
set { this["enabled"] = value; }
}
[ConfigurationProperty("cloudFrontDomainName", DefaultValue = "", IsRequired = true)]
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: