Skip to content

Instantly share code, notes, and snippets.

View hoetz's full-sized avatar

Florian Hötzinger hoetz

View GitHub Profile
call :ExecuteCmd dotnet publish "D:\home\site\repository\src\Web" --output "%DEPLOYMENT_TEMP%"
@hoetz
hoetz / Type.fs
Created April 17, 2016 06:46
SplitContainer
type SplitContainerChildPosition= One | Two
type IContainerComponent =
abstract ComponentId : string
type Empty () =
interface IContainerComponent with
member this.ComponentId = "Empty"
type Table () =
@hoetz
hoetz / kestrelprob
Last active March 1, 2016 16:31
Kestrel+HTTPS on Mac OS X problem (aspnet core RC1)
in startup.cs
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory,IApplicationEnvironment appEnv)
{
var testCertPath = Path.Combine(appEnv.ApplicationBasePath,"certificate.pfx");
if (File.Exists(testCertPath))
{
app.UseKestrelHttps(new X509Certificate2(testCertPath, "PASSWORD"));
}
@hoetz
hoetz / css_tables
Last active February 9, 2016 10:16
css table
.table {width: 100%; height: 100%;}
.row {width: 100%; min-height: 1px; height: auto; margin: 0;}
.cell {float: left; margin: 0; padding: 0;}
.onecol {width: 100%;}
.twocolLeft {width: 40%;}
.twocolRight {width: 60%;}
<div class="table">
<div class="row">
@hoetz
hoetz / Untitled-1
Created February 1, 2016 13:07
DN split
private List<string> GetDistinguishedNamePartList(bool withNameQualifier)
{
string ouQualifier = "ou=";
string nameQualifier = "cn=";
string domainQualifier = "dc=";
string[] arrayOfEntryStrings = null;
List<string> listOfEntryStrings = new List<string>();
if (withNameQualifier)
{
@hoetz
hoetz / githubpstoken.ps1
Last active March 27, 2018 18:22
Github auth token with powershell
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("USERNAME:PASSWORD")))
Invoke-RestMethod -Uri "https://api.github.com/authorizations" -method post -ContentType "application/json" -Body "{""scopes"" : ""gist"",""note"":""VSCode-Gist-Extension""}" -Headers @{"Authorization"="Basic $base64AuthInfo"}
@hoetz
hoetz / gist:8c2760fa58e1f14b6c28
Created August 19, 2015 09:06
Windows 10 Store Tweetium Trouble
{D980E029-7ABF-427A-9FED-5625CB9DE2A7} 2015-08-19 11:05:11:340+0200 1 181 [AGENT_INSTALLING_STARTED] 101 {797679CC-F58D-49D7-989E-8994053A5D6A} 1 0 WSAcquisition Success Content Install Installation Started: Windows has started installing the following update: Microsoft.WinJS.2.0
{1EC36165-BFB3-461B-A83F-416D3C6F03AE} 2015-08-19 11:05:11:480+0200 1 182 [AGENT_INSTALLING_FAILED] 101 {797679CC-F58D-49D7-989E-8994053A5D6A} 1 80073cff WSAcquisition Failure Content Install Installation Failure: Windows failed to install the following update with error 0x80073cff: Microsoft.WinJS.2.0.
{E6336110-7369-4CB8-BA83-992FF0C9CEDA} 2015-08-19 11:05:11:480+0200 1 181 [AGENT_INSTALLING_STARTED] 101 {32A453D8-DB4A-4DDA-8E62-56C0C7A04C2B} 1 0 WSAcquisition Success Content Install Installation Started: Windows has started installing the following update: Tweetium
{23E872CA-FA67-4959-9E9F-5DF9F9288C0D} 2015-08-19 11:05:11:699+0200 1 182 [AGENT_INSTALLING_FAILED] 101 {32A453D8-DB4A-4DDA-8E62-56C0C7A04C2B} 1 80073cff WSAcquisition
@hoetz
hoetz / gist:09391592d11e28032c6e
Created January 1, 2015 19:04
WindowsAzure.Storage 4.3.2 problem with k runtime on Mac OS X
System.TypeLoadException : Could not load type 'Microsoft.WindowsAzure.Storage.Core.Executor.RESTCommand`1[Microsoft.WindowsAzure.Storage.Table.TableResult]' from assembly 'Microsoft.WindowsAzure.Storage, Version=4.3.2.0, Culture=neutral, PublicKeyToken=null'.
Stack Trace:
at Microsoft.WindowsAzure.Storage.Table.TableOperation.ExecuteAsync (Microsoft.WindowsAzure.Storage.Table.CloudTableClient client, System.String tableName, Microsoft.WindowsAzure.Storage.Table.TableRequestOptions requestOptions, Microsoft.WindowsAzure.Storage.OperationContext operationContext, CancellationToken cancellationToken) [0x00000] in <filename unknown>:0
at Microsoft.WindowsAzure.Storage.Table.CloudTableClient.ExecuteAsync (System.String tableName, Microsoft.WindowsAzure.Storage.Table.TableOperation operation, Microsoft.WindowsAzure.Storage.Table.TableRequestOptions requestOptions, Microsoft.WindowsAzure.Storage.OperationContext operationContext, CancellationToken cancellationToken) [0x00000] in <filen
@hoetz
hoetz / gist:3f517a2a28e4e78053b8
Last active December 27, 2016 16:02
asp.net vNext Identity for dummies: your own storage providers
using Microsoft.AspNet.Builder;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.AspNet.Diagnostics;
using Microsoft.AspNet.Identity;
using ManagementWeb.Models;
using ManagementWeb.Storage;
namespace HelloMvc
{
@hoetz
hoetz / gist:940a975e8f1238f156a0
Last active August 29, 2015 14:12
aspnet vNext + Autofixture + NSubstitute (Bonus: setup for MVC Controllers)
using Web.Controllers;
using Web.Model;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Http;
using Xunit;
public class HomeTests
{
[Theory]