Skip to content

Instantly share code, notes, and snippets.

View choudeshell's full-sized avatar

Chris Houdeshell choudeshell

View GitHub Profile
using EnergyCap.Sdk;
using EnergyCap.Sdk.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
http://localhost:2375/v1.24/images/json
docker run hello-world
docker run -it ubuntu bash
docker run -d -p 8000:80 nginx
docker run -d -p 8000:80 -v c:\Techbash\html:/usr/share/nginx/html nginx
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="true" stdoutLogFile="..\logs\stdout.log"></httpPlatform>
</system.webServer>
</configuration>
$/
  docs/
  src/
  tests/
  samples/
  artifacts/
  packages/
  build/
 lib/

EnergyCAP Dev

##Dev Questions

  1. Describe a few design patterns (besides factory or singleton).
  2. Explain Inversion of Control and dependency injection.
  3. Why are interfaces important?
  4. Why are coding standards/conventions important?
  5. How do YOU refactor code?
  6. Explain Single Responsibility Principle and why it is important?
DECLARE @a int
SET @a = 100
DECLARE @b int
SET @b = 101
select * from table where tableId in (@a,@b)
select * from table where tableId = @a
@choudeshell
choudeshell / gist:6276595
Created August 20, 2013 02:49
Type 'Castle.Proxies.IRepository`1Proxy' from assembly 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is attempting to implement an inaccessible interface.
public class DynamoMock
{
public static Mock Mock(Type type)
{
var mock = typeof(Mock<>).MakeGenericType(type).GetConstructor(Type.EmptyTypes).Invoke(new object[] { });
return (Mock) mock;
}
public static Mock Mock(Type type, Type type2)
{
@choudeshell
choudeshell / ResourceFileInfo.cs
Created March 16, 2013 01:28
Embedded Resource Provider for Katana
using Microsoft.Owin.FileSystems;
using System;
using System.Reflection;
namespace Metrical.Providers
{
public class ResourceFileInfo : IFileInfo
{
private string _filePath;
private Assembly _assembly;
@choudeshell
choudeshell / gist:5005986
Created February 21, 2013 16:34
Entity Framework Insert/Update Trace Extension
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EnergyCAP.EF.Extensions
{
using System;
using System.Collections.Generic;
using System.Linq;
@choudeshell
choudeshell / gist:4703750
Last active December 12, 2015 02:59
This XML file does not appear to have any style information associated with it. The document tree is shown below. <Error> <Message>An error has occurred.</Message> <ExceptionMessage> Multiple types were found that match the controller named 'Test'. This can happen if the route that services this request ('api/v1/hello') found multiple controller…
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
namespace MvcApplication1
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)