Skip to content

Instantly share code, notes, and snippets.

View JasonOffutt's full-sized avatar

Jason Offutt JasonOffutt

  • Infusionsoft
  • Gilbert, AZ
View GitHub Profile

Some of the Redis best practices content has moved

This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.

NOTE: Client specific guidance listed below is still valid and should still be considered. I will update this document once all content has been moved.

@nairdo
nairdo / NuGetPackageFolder.cs
Last active December 14, 2016 14:04
From the NuGet Package Explorer's MainWindow.xaml.cs and the PackageViewModel PackageFolder class...
///
/// Example building a package (from the NuGet PackageBuilderTest.cs class)
///
// Act
var builder = new PackageBuilder { Id = "test", Version = new SemanticVersion("1.0"), Description = "test" };
builder.Authors.Add("test");
foreach (var name in fileNames)
{
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@ghostbar
ghostbar / app.coffee
Created February 12, 2012 01:49
How to read session from Redis with Express + Socket.IO in CoffeeScript
class App
express = require 'express'
redis = require 'redis'
RedisStore = require('connect-redis')(express)
sessionStore = new RedisStore()
# These will be used only on ioController()
fs = require 'fs'
parseCookie = require('connect').utils.parseCookie
@ntotten
ntotten / AccountController.cs
Created March 21, 2011 18:31
ASP.NET MVC 3 Simple Authorization
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Facebook;
using MyFacebookSite3434.Models;
using System.Web.Security;
namespace MyFacebookSite3434.Controllers