Skip to content

Instantly share code, notes, and snippets.

View ChrisMissal's full-sized avatar
💭
set status

Chris Missal ChrisMissal

💭
set status
View GitHub Profile
@jrunning
jrunning / server.rb
Created June 30, 2014 18:10
Instant Ruby CGI server
#!/usr/bin/env ruby
require "webrick"
server = WEBrick::HTTPServer.new(Port: 8080, DocumentRoot: Dir::pwd)
trap("INT") { server.shutdown }
server.start
anonymous
anonymous / gist:ec2a02e7d2e6011074be
Created May 6, 2014 19:19
Execute async method synchronously
internal static class AsyncHelper {
private static readonly TaskFactory taskFactory = new TaskFactory(CancellationToken.None, TaskCreationOptions.None, TaskContinuationOptions.None, TaskScheduler.Default);
public static TResult RunSync<TResult>(Func<Task<TResult>> func) {
return taskFactory.StartNew(func).Unwrap().GetAwaiter().GetResult();
}
public static void RunSync(Func<Task> func) {
taskFactory.StartNew(func).Unwrap().GetAwaiter().GetResult();
}
@beaugunderson
beaugunderson / Default (OSX).sublime-keymap
Created January 23, 2014 23:22
Sublime Text macros for converting to and from 2 and 4 space indentation
[
{
"keys": ["ctrl+2"],
"command": "run_macro_file",
"args": {
"file": "Packages/User/to-2.sublime-macro"
}
},
{
"keys": ["ctrl+4"],

We're doing a small year-end news nerd countdown on Source. Lists are too much, so please send us ONE THING—an app, a tool, an article, a tweet, an image, a map, or something else entirely—that you loved this year. Might be something that made your job easier or made you smarter, or it might have more obscure relevance. All we ask is that you can link to it.

Don't think too hard about it, just take 30 seconds and send one in now to [email protected]. We'll be posting an assembly of favorite things and all we can say about it right now is that there will be GIFs.

[email protected]

Wooo.

@jbogard
jbogard / UrlHelprLinkr.cs
Created December 11, 2013 21:37
Hyprlinkr + UrlHelper
using System;
using System.Linq.Expressions;
using System.Web.Http;
using System.Web.Http.Routing;
using Ploeh.Hyprlinkr;
public static class UrlHelperExtensions
{
public static Uri Link<T, TResult>(this UrlHelper helper, Expression<Func<T, TResult>> expression)
where T : ApiController
@anaisbetts
anaisbetts / doc.md
Last active December 29, 2015 07:29
The smallest number of WinDbg commands you can know to Do Stuff With VS

File => Attach To Process, pick devenv.exe

First, fix the symbols and shit

.symfix
.reload
.loadby sos clr
@jbogard
jbogard / Featurefolders.cs
Created October 3, 2013 15:55
Feature folders
public class FeatureViewLocationRazorViewEngine : RazorViewEngine
{
public FeatureViewLocationRazorViewEngine()
{
ViewLocationFormats = new[]
{
"~/Features/{1}/{0}.cshtml",
"~/Features/{1}/{0}.vbhtml",
"~/Features/Shared/{0}.cshtml",
"~/Features/Shared/{0}.vbhtml",
@eevee
eevee / spabs.md
Last active June 22, 2025 22:20
tabs to spaces
@bradwilson
bradwilson / AutoMockWebApiAttribute.cs
Created August 22, 2013 17:56
Auto-mock setup for Web API
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Http.Hosting;
using System.Web.Http.Routing;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
using NSubstitute;
@danielmarbach
danielmarbach / AssemblyInfo.cs
Created July 22, 2013 17:56
My InMemory approach for unit testing and acceptance testing with NServiceBus which uses custom IBus, FluentAssertions and NUnit actions
[assembly: WithBus]