Skip to content

Instantly share code, notes, and snippets.

View sstorie's full-sized avatar

Sam Storie sstorie

  • SPS Commerce
  • Minnesota, USA
  • X @sstorie
View GitHub Profile
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@james2doyle
james2doyle / IIFE Sublime Snippet
Created January 9, 2013 02:35
Immediately-Invoked Function Expression IIFE snippet for Sublime Text 2
<snippet>
<content><![CDATA[
(function () {
${1:// body}
})();
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>iife</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
@mfcollins3
mfcollins3 / GenerateVersionInfo.xml
Created January 24, 2013 16:44
Classes for using semantic version numbers with .NET applications. For more information, see <http://www.michaelfcollins3.me/blog/2013/01/23/semantic_versioning_dotnet.html>.
<!--
The GenerateVersionInfo task will generate the VersionInfo.cs file with the
metadata for the current build.
-->
<UsingTask TaskName="GenerateVersionInfo"
TaskFactory="CodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
@lethek
lethek / AirtimeHub.cs
Last active March 27, 2017 22:22
Using Autofac to inject dependencies into SignalR hubs and manage dependency lifetimes: management of the lifetimes of dependencies will happen automatically as long as the Hub inherits from AirtimeHub and the dependencies are registered with Autofac with a InstancePerLifetimeScope() option.
using System;
using Microsoft.AspNet.SignalR;
namespace Airtime.Hubs
{
/// <summary>
/// Hubs that have injected dependencies which must be scoped to the same lifetime should
@wilsonwc
wilsonwc / stateMock.js
Created January 10, 2014 17:24
Angular Mock for properly resolving ui-router $state in Karma unit tests
angular.module('stateMock',[]);
angular.module('stateMock').service("$state", function($q){
this.expectedTransitions = [];
this.transitionTo = function(stateName){
if(this.expectedTransitions.length > 0){
var expectedState = this.expectedTransitions.shift();
if(expectedState !== stateName){
throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName );
}
}else{
@soofaloofa-zz
soofaloofa-zz / On choosing a hypermedia type
Last active October 14, 2023 07:23
On choosing a hypermedia type for your API - HAL, JSON-LD, Collection+JSON, SIREN, Oh My!
A comparison of Collection+JSON, HAL, JSON-LD and SIREN media types.
Discussion at
http://sookocheff.com/posts/2014-03-11-on-choosing-a-hypermedia-format/
##
# Creates an alias called "git hist" that outputs a nicely formatted git log.
# Usage is just like "git log"
# Examples:
# git hist
# git hist -5
# git hist <branch_name>
# git hist <tag_name> -10
##
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short"
@blair55
blair55 / 1 - InfrastructureRegistry.cs
Last active August 29, 2015 13:58
ServiceStack.Redis and StructureMap
using System;
using System.Configuration;
using ServiceStack.Redis;
using StructureMap;
using StructureMap.Configuration.DSL;
namespace Example.IoC
{
public class InfrastructureRegistry : Registry
{
@staltz
staltz / introrx.md
Last active July 27, 2024 04:59
The introduction to Reactive Programming you've been missing
@jchannon
jchannon / bootstrapper.cs
Last active August 31, 2017 01:11
This will handle Nancy content negotiation on errors so the client receives JSON, XML or HTML based on the client Accept headers
public class CustomBootstrapper : DefaultNancyBootstrapper
{
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
{
pipelines.OnError += (ctx, exception) =>
{
ctx.Items.Add("OnErrorException", exception);
return null;
};
}