Skip to content

Instantly share code, notes, and snippets.

@gistlyn
gistlyn / Configure.Mq.cs
Last active August 4, 2024 03:27
Use RabbitMQ
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using ServiceStack;
using ServiceStack.Messaging;
using ServiceStack.RabbitMq;
[assembly: HostingStartup(typeof(MyApp.ConfigureMq))]
namespace MyApp;
/**
@gistlyn
gistlyn / Configure.Mq.cs
Last active August 4, 2024 03:27
Use Memory Background MQ
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using ServiceStack;
using ServiceStack.Messaging;
[assembly: HostingStartup(typeof(MyApp.ConfigureMq))]
namespace MyApp;
/**
@gistlyn
gistlyn / MyApp.csproj
Last active November 22, 2023 03:36
.NET 6 and .NET v4.72 Integration Test
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net472</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.*" />
<PackageReference Include="NUnit3TestAdapter" Version="4.1.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.*" />
@gistlyn
gistlyn / Configure.AppHost.cs
Last active November 22, 2023 03:35
Empty .NET 6 LTS ServiceStack App
using Funq;
using ServiceStack;
using MyApp.ServiceInterface;
[assembly: HostingStartup(typeof(MyApp.AppHost))]
namespace MyApp;
public class AppHost : AppHostBase, IHostingStartup
{
@gistlyn
gistlyn / Configure.AppHost.cs
Last active November 22, 2023 03:35
Empty .NET 6 ServiceStack App
using Funq;
using ServiceStack;
using MyApp.ServiceInterface;
[assembly: HostingStartup(typeof(MyApp.AppHost))]
namespace MyApp;
public class AppHost : AppHostBase, IHostingStartup
{
@gistlyn
gistlyn / MyApp.csproj
Last active November 22, 2023 03:31
C# .NET 6 Console App
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>Exe</OutputType>
<NoWarn>1591</NoWarn>
</PropertyGroup>
@gistlyn
gistlyn / mix.md
Created November 9, 2021 14:44
Mix Gists

Available Gists

Projects

  • console-cs {to:'.'} project,C# C# .NET 5 Console App
  • console-fs {to:'.'} project,F# F# .NET 5 Console App
  • console-vb {to:'.'} project,VB VB .NET 5 Console App
  • console-ss {to:'.'} project,S# #Script Console App
  • console-lisp {to:'.'} project,Lisp #Script Lisp Console App
  • init {to:'.'} project,C# Empty .NET 5 ServiceStack App
@gistlyn
gistlyn / KeyboardEvents.vue
Last active April 22, 2025 14:08
Vue3 TypeSense Search Components for typesense search
<!-- BSD License: https://docs.servicestack.net/BSD-LICENSE.txt -->
<template>
<div class="hidden"></div>
</template>
<script>
export default {
created() {
const component = this;
this.handler = function (e) {
@gistlyn
gistlyn / Dockerfile
Created October 27, 2021 09:36
Create Linux TeamCity Agent with .NET 6.0 RC2
FROM jetbrains/teamcity-agent:latest
ARG DEBIAN_FRONTEND=noninteractive
USER root
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN apt-get update
# remove previous dotnet from teamcity-agent install
RUN rm /usr/bin/dotnet \
&& rm -rf /usr/share/dotnet \
@gistlyn
gistlyn / MyApp.csproj
Created October 14, 2021 10:46
.NET 5 and .NET v4.72 Integration Test
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;net472</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit3TestAdapter" Version="3.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.*" />
<PackageReference Include="NUnit" Version="3.*" />