Skip to content

Instantly share code, notes, and snippets.

View jeff-french's full-sized avatar

Jeff French jeff-french

View GitHub Profile
@jeff-french
jeff-french / IpAddressValidator.cs
Created July 5, 2011 06:25
[BLOG] Gist+AppHarbor=Sad Face :(
using System.Web;
using Glimpse.Core.Configuration;
using Glimpse.Core.Extensibility;
namespace Glimpse.Core.Validator
{
[GlimpseValidator]
internal class IpAddressValidator:IGlimpseValidator{
public bool IsValid(HttpContextBase context, GlimpseConfiguration configuration, LifecycleEvent lifecycleEvent)
{
@jeff-french
jeff-french / .gitignore
Created October 6, 2011 19:30
git ignore file for .NET projects
#OS junk files
[Tt]humbs.db
*.DS_Store
#Visual Studio files
*.[Oo]bj
*.user
*.aps
*.pch
*.vspscc
@jeff-french
jeff-french / gist:1506688
Created December 21, 2011 16:36
Remove reference from all projects in a solution using Package Manager Console
foreach ($proj in get-project -all) { $proj.Object.References | Where-Object {$_.Name -eq 'Enyim.Caching'} | ForEach-Object { $_.Remove()} }
@jeff-french
jeff-french / .gitconfig
Last active October 1, 2015 10:57
My gitconfig file
[user]
name = Jeff French
email = [email protected]
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = auto
[gc]
@jeff-french
jeff-french / profile.ps1
Created April 10, 2012 14:41
Add Git bin path to PowerShell session for Posh-Git
# Add Git bin directory to path for this session
$env:path += ";" + (Get-Item "Env:ProgramFiles(x86)").Value + "\Git\bin"
@jeff-french
jeff-french / pc.config
Created January 2, 2013 02:56
Chocolatey config file for setting up a fresh PC.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="VisualStudio2012Ultimate" />
<package id="resharper" />
<package id="MsSqlServer2012Express" />
<package id="dropbox" />
<package id="7zip" />
<package id="console2" />
<package id="nodejs.install" />
<package id="sublimetext2.app" />
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
@jeff-french
jeff-french / ICacheClientExtensions.cs
Created April 11, 2013 16:19
Extension method for ServiceStack ICacheClient that fetches an item from the cache or adds it if it is not there.
public static T GetOrAdd<T>(this ICacheClient cache, string key, DateTime expiresAt, Func<T> getItemToCacheDelegate)
{
T item;
var itemIsInCache = !cache.Add(key, "", expiresAt);
if (itemIsInCache)
{
item = cache.Get<T>(key);
}
else
@jeff-french
jeff-french / Gruntfile.js
Last active December 26, 2015 01:39
PhoneGap development with Ripple and Grunt
module.exports = function(grunt) {
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
express: {
all: {
options: {
port: 9000,
hostname: '0.0.0.0',
@jeff-french
jeff-french / Gruntfile.js
Created November 20, 2013 23:18
PhoneGap development with Grunt Ripple and a browser
grunt.registerTask('server', 'minify','and-all-that','cool-stuff', 'ripple');