Skip to content

Instantly share code, notes, and snippets.

csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netstandard2.0</TargetFrameworks>
<IncludeBuildOutput>false</IncludeBuildOutput>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<NuspecFile>mycontent.nuspec</NuspecFile>
</PropertyGroup>
</Project>
@jmorrill
jmorrill / tvm.cs
Created April 19, 2020 08:40
tvm c#
using System;
namespace LibNative
{
using System.Runtime.InteropServices;
public static partial class libnative
{
/// <summary>
///
C:\src>mkdir BasePath
C:\src>fsutil.exe file setCaseSensitiveInfo BasePath enable
Case sensitive attribute on directory C:\src\BasePath is enabled.
C:\src>cd BasePath
C:\src\BasePath>mkdir one
C:\src\BasePath>fsutil.exe file setCaseSensitiveInfo one enable
@jmorrill
jmorrill / sqlite_orm_crash_repo.cpp
Created March 12, 2018 07:01
sqlite_orm_crash_repo.cpp
#include "stdafx.h"
#include "sqlite_orm.h"
#include <string>
#include <iostream>
#include <vector>
using std::cout;
using std::endl;
using SharpDX.Direct3D9;
using SharpDX.Multimedia;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Interop;
@jmorrill
jmorrill / udp_test.c
Created March 3, 2017 01:10
udp test for wsl
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "uv.h"
const char* probe_message = "<Envelope xmlns=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:dn=\"http://www.onvif.org/ver10/network/wsdl\">"
"<Header>"
"<wsa:MessageID xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">urn:uuid:C97CF2F7-615A-493C-88FE-7D39B94906E0</wsa:MessageID>"
"<wsa:To xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">urn:schemas-xmlsoap-org:ws:2005:04:discovery</wsa:To>"
"<wsa:Action xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe</wsa:Action>"
@jmorrill
jmorrill / 0107-Chose-to-create-IDirect3DDevice9Ex-if-available.patch
Created February 18, 2017 22:41
Patch for ffmpeg 3.2.4 for higher perf dxva (in things like wpf)
From e0eb0152371327a54bf6cf209a600bb21896e34e Mon Sep 17 00:00:00 2001
From: Jeremiah Morrill <[email protected]>
Date: Wed, 25 Jan 2017 22:04:15 -0800
Subject: [PATCH 107/107] Chose to create IDirect3DDevice9Ex if available
---
libavutil/hwcontext_dxva2.c | 46 ++++++++++++++++++++++++++++++++++++---------
1 file changed, 37 insertions(+), 9 deletions(-)
diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c
@jmorrill
jmorrill / gist:73e914cd2bbf19cdd797
Created November 17, 2015 23:04
vs 2015 crash.cpp
#include <functional>
#include <string>
int main()
{
std::string test_string = "abcde";
auto function1 = [=, test_string = std::move(test_string)]
{
auto test_string2 = std::move(test_string);
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdint.h>
#include <vector>
#include <algorithm>
#include <filesystem>
#include <random>
@jmorrill
jmorrill / maybe_bug.cpp
Last active August 29, 2015 14:22
vs2013 vc++ bug?
/////VS 2013 /////
//////////////////
#include "stdafx.h"
#include <assert.h>
#include <thread>
#define __thread_local __declspec(thread)
const int some_int = 5;