Skip to content

Instantly share code, notes, and snippets.

Ruben Bartelink bartelink

Block or report user

Report or block bartelink

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@filipw
filipw / gist:9846071
Last active May 3, 2016
ASP.NET Web API hosted in Azure Worker Role with OWIN in F#
View gist:9846071
namespace WebApi.AzureWorker
open Owin
open System
open System.Diagnostics
open System.Net
open System.Threading
open System.Net.Http
open System.Web.Http
open Microsoft.Owin.Hosting
@ploeh
ploeh / gist:9702672
Created Mar 22, 2014
ASP.NET Web API 2 ApiController AutoFixture Customization
View gist:9702672
type ApiControllerCustomization() =
let controllerSpecification =
{ new IRequestSpecification with
member this.IsSatisfiedBy request =
match request with
| :? Type as t when typeof<ApiController>.IsAssignableFrom t ->
true
| _ -> false }
interface ICustomization with
@bradwilson
bradwilson / Cacheability.cs
Created Jan 23, 2014
Using chaining to create cached results in ASP.NET Web API v2
View Cacheability.cs
public enum Cacheability
{
NoCache,
Private,
Public,
}
View adams-heroku-values.md

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@jboner
jboner / latency.txt
Last active Oct 20, 2019
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@Buthrakaur
Buthrakaur / gist:1613003
Created Jan 14, 2012
NHibernate QueryOver.List extension to support casting to anonymous types
View gist:1613003
public static IList<TRes> ListAs<TRes>(this IQueryOver qry, TRes resultByExample)
{
var ctor = typeof (TRes).GetConstructors().First();
return qry.UnderlyingCriteria
.SetResultTransformer(Transformers.AliasToBeanConstructor(ctor))
.List<TRes>();
}
[Fact]
public void ListAs_Should_CastQueryOverResultToTypeSameAsSupliedExampleInstance()
You can’t perform that action at this time.