Skip to content

Instantly share code, notes, and snippets.

View friism's full-sized avatar

Michael Friis friism

  • Heroku/Salesforce
  • San Francisco, CA
View GitHub Profile
@friism
friism / Dockerfile
Last active May 12, 2017 14:03
run multiple powershell scripts
FROM microsoft/windowsservercore
ADD hello.ps1 .
ADD world.ps1 .
CMD powershell .\hello.ps1 ; .\world.ps1
@friism
friism / gist:1ba85149305ffe6e2654
Created March 30, 2015 21:14
kpm build src/Npgsql/project.json
/app/src/src/Npgsql/NpgsqlCommand.cs(1266,30): error CS0103: The name 'ExecuteNonQueryInternalAsync' does not exist in the current context
/app/src/src/Npgsql/NpgsqlCommand.cs(1330,30): error CS0103: The name 'ExecuteScalarInternalAsync' does not exist in the current context
/app/src/src/Npgsql/NpgsqlCommand.cs(1418,30): error CS0103: The name 'ExecuteDbDataReaderInternalAsync' does not exist in the current context
/app/src/src/Npgsql/TlsClientStream/EllipticCurve.cs(1111,29): error CS0246: The type or namespace name 'ECDsaCng' could not be found (are you missing a using directive or an assembly reference?)
/app/src/src/Npgsql/TlsClientStream/EllipticCurve.cs(1111,64): error CS0103: The name 'CngKeyBlobFormat' does not exist in the current context
/app/src/src/Npgsql/TlsClientStream/EllipticCurve.cs(1111,38): error CS0103: The name 'CngKey' does not exist in the current context
/app/src/src/Npgsql/NpgsqlCommand.cs(1259,32): warning CS0114: 'NpgsqlCommand.ExecuteNonQueryAsync(CancellationToken)' hides inherite
@friism
friism / gist:2462546
Created April 22, 2012 07:42
SqlServerCompact PostBuildEvent
Existing:
if not exist "$(TargetDir)x86" md "$(TargetDir)x86"
xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\x86\*.*" "$(TargetDir)x86"
if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64"
xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\amd64\*.*" "$(TargetDir)amd64"</PostBuildEvent>
Proposed:
if not exist "$(TargetDir)x86" md "$(TargetDir)x86"
start /MIN xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\x86\*.*" "$(TargetDir)x86"
if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64"
@friism
friism / CookieTempDataProvider.cs
Created April 4, 2012 00:35
CookieTempDataProvider for ASP.NET
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Web;
using System.Web.Mvc;
namespace AppHarbor.Web.Mvc
@friism
friism / gist:1324012
Created October 29, 2011 02:35
Diff to make nopCommerce build on AppHarbor
From ddb62c47a66e4435d3e53d224a8952c77cd57787 Mon Sep 17 00:00:00 2001
From: Michael Friis <friism@gmail.com>
Date: Fri, 28 Oct 2011 18:43:38 -0700
Subject: [PATCH] Make solution build on AppHarbor
---
AppHarbor.sln | 694 ++++++++++++++++++++
.../Nop.Web.Framework/Nop.Web.Framework.csproj | 3 +-
Tests/Nop.Data.Tests/Nop.Data.Tests.csproj | 9 +-
.../Helpers/DateTimeHelperTests.cs | 18 -
protected void Application_Error(object sender, EventArgs e)
{
try
{
var exception = Server.GetLastError();
var logEntry = new LogEntry
{
Date = DateTime.Now,
Message = exception.Message,
StackTrace = exception.StackTrace,
@friism
friism / gist:825375
Created February 14, 2011 01:43
.gitignore for Visual Studio based solutions
[Oo]bj
[Bb]in
deploy
deploy/*
*.csproj.user
*.suo
*.cache
TestResults/