Skip to content

Instantly share code, notes, and snippets.

View chrisortman's full-sized avatar

Chris Ortman chrisortman

View GitHub Profile
@chrisortman
chrisortman / gist:1123807
Created August 3, 2011 21:25
vim script to remove webforms tags and replace with razor
function! DumpWebforms()
%s/<% \([^}]\)/@\1
%s/<%= /@
%s/<%=/@
%s/<%//
%s/%>//
endfunction
@chrisortman
chrisortman / gist:1092889
Created July 19, 2011 15:58
Configure rolling file logging for nlog
SimpleConfigurator.ConfigureForTargetLogging(
new NLog.Targets.FileTarget()
{
FileName = "${specialfolder:MyDocuments}/logs/" + filename + ".${shortdate}.txt",
Layout = new NLog.Layouts.SimpleLayout("${longdate} [${level:uppercase=true}] [${threadid}] ${callsite} - ${message}"),
ArchiveFileName = "${specialfolder:MyDocuments}/logs/archived/" + filename + ".{#####}.txt",
ArchiveAboveSize = 10000000 /* 10 MB */,
ArchiveNumbering = ArchiveNumberingMode.Sequence,
ConcurrentWrites = true,
KeepFileOpen = false,
@chrisortman
chrisortman / gist:994090
Created May 26, 2011 21:10
First stab at powershell function to check if project has a package
function Test-Project {
param(
#The package we are looking for
$PackageName
)
Process {
$hasPackage = $false
$packages = get-package $PackageName -First 1
foreach ($package in $packages) {
param($packageName)
write-host "Testing $packageName"
$chocPath = "c:\nuget"
$binFile = "c:\nuget\bin\$packageName.bat"
if(test-path $binFile) {
Write-host "Removing $binFile"
Remove-Item $binFile
@chrisortman
chrisortman / gist:844540
Created February 25, 2011 21:33
Why cant i have guid primary keys entity framework :(
if (entitySet.ElementType.KeyMembers.Count > 0)
{
builder.Append(" PRIMARY KEY (");
bool flag = true;
foreach (EdmMember member in entitySet.ElementType.KeyMembers)
{
if (IsServerGeneratedGuid(member))
{
throw ADP1.ServerGeneratedGuidKeyNotSupportedException(member.Name);
}
@chrisortman
chrisortman / gist:828404
Created February 15, 2011 22:30
Razor view with weird rule
@model InnovativeSystems.OSS.OrderClient.Modules.Order.Web.EditRatePlanModel
@{
ViewBag.Title = "Edit";
}
<script>
$(document).ready(function () {
$('.rate-plan-attributes input:text').editMaskValidate();
});
</script>
Topic:
Windows Phone 7 for Developers, an Overview
In this session we take a first look at the new phone from Microsoft how developers can leverage their existing skills to build applications using the these technologies
We will explore the tools and approaches for building applications including Silverlight and XNA, how to get the free tools to get started, and what you need to do to join the Windows Mobile Marketplace so you can monetize your latest creation on the Windows Phone platform.
Presented By: Mike Benkovich
When: October 14, 2010 5:30
Location: Electrical Engineering / Physics Building #252 (EP252), SDSM&T Campus http://sdmines.sdsmt.edu/campusmap ,501 East Saint Joseph Street, Rapid City, SD
System.NotSupportedException was unhandled by user code
Message=Unable to determine the provider name for connection of type 'System.Data.SqlClient.SqlConnection'.
Source=Microsoft.Data.Entity.Ctp
StackTrace:
at Microsoft.Data.Objects.ContextBuilder`1.GetProviderServices(DbConnection storeConnection, String& providerInvariantName, String& providerManifestToken)
at Microsoft.Data.Objects.ContextBuilder`1.Create(DbConnection storeConnection)
at Elation.CustomerPortal.Infrastructure.EntityFrameworkSetup.Init() in C:\Development\elation\OSS\Current Version\Web\src\Elation.CustomerPortal\Infrastructure\EntityFrameworkFacility.cs:line 164
at IS.eBillWeb.Global.Application_Start() in C:\Development\elation\OSS\Current Version\Web\src\IS.eBillWeb\Global.asax.cs:line 33
InnerException:
// This source code is dual-licensed under the Apache License, version
// 2.0, and the Mozilla Public License, version 1.1.
//
// The APL v2.0:
//
//---------------------------------------------------------------------------
// Copyright (C) 2007-2009 LShift Ltd., Cohesive Financial
// Technologies LLC., and Rabbit Technologies Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
making all mod_portaudio
libtool: compile: gcc -c -I./include -I./src/common -I./src/os/unix -Werror -g -O2 -DPA_LITTLE_ENDIAN -arch x86_64 -arch ppc64 -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.3 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DHAVE_NANOSLEEP=1 -DPA_USE_COREAUDIO=1 src/common/pa_dither.c -fno-common -DPIC -o src/common/pa_dither.o
cc1: warnings being treated as errors
src/common/pa_dither.c: In function ‘PaUtil_Generate16BitTriangularDither’:
src/common/pa_dither.c:73: warning: right shift count >= width of type
src/common/pa_dither.c:74: warning: right shift count >= width of type
src/common/pa_dither.c: In func