Skip to content

Instantly share code, notes, and snippets.

@gistlyn
gistlyn / SimpleModal.mjs
Created October 8, 2024 01:12
SimpleModal Vue Component
import { ref, computed } from "vue"
export const SimpleModal = {
template:`
<div :id="id" :data-transition-for="id" @mousedown="close" class="relative z-10"
:aria-labelledby="id + '-title'" role="dialog" aria-modal="true">
<div :class="['fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity', transition1]">
<div class="fixed inset-0 z-10 overflow-y-auto">
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
<div :class="[modalClass, sizeClass, transition2]" @mousedown.stop="">
@gistlyn
gistlyn / MyApp.vbproj
Last active October 3, 2024 00:26
init-vb files
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5</TargetFramework>
<TypeScriptToolsVersion>latest</TypeScriptToolsVersion>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ServiceStack" Version="5.*" />
@gistlyn
gistlyn / mix.md
Last active September 9, 2024 08:00
Mix Gists

Available Gists

Projects

  • console-cs {to:'.'} project,C# C# .NET 8 Console App
  • console-fs {to:'.'} project,F# F# .NET 8 Console App
  • console-vb {to:'.'} project,VB VB .NET 8 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 8 ServiceStack App
using ServiceStack;
[assembly: HostingStartup(typeof(MyApp.ConfigureRequestLogs))]
namespace MyApp;
public class ConfigureRequestLogs : IHostingStartup
{
public void Configure(IWebHostBuilder builder) => builder
.ConfigureServices((context, services) => {
@gistlyn
gistlyn / Configure.Profiling.cs
Last active September 9, 2024 07:58
profiling
using ServiceStack;
[assembly: HostingStartup(typeof(MyApp.ConfigureProfiling))]
namespace MyApp;
public class ConfigureProfiling : IHostingStartup
{
public void Configure(IWebHostBuilder builder) => builder
.ConfigureServices((context, services) => {
using ServiceStack.Jobs;
using ServiceStack.Web;
[assembly: HostingStartup(typeof(MyApp.ConfigureRequestLogs))]
namespace MyApp;
public class ConfigureRequestLogs : IHostingStartup
{
public void Configure(IWebHostBuilder builder) => builder
using ServiceStack.Data;
using ServiceStack.Jobs;
using ServiceStack.Web;
[assembly: HostingStartup(typeof(MyApp.ConfigureBackgroundJobs))]
namespace MyApp;
public class ConfigureBackgroundJobs : IHostingStartup
{
@gistlyn
gistlyn / models.csv
Last active August 6, 2024 06:21
ai-server
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 3 columns, instead of 1 in line 7.
id,url,short_desc
llama3.1,https://ollama.ai//library/llama3.1,"Llama 3.1 is a new state-of-the-art model from Meta available in 8B, 70B and 405B parameter sizes."
gemma2,https://ollama.ai//library/gemma2,"Google Gemma 2 is a high-performing and efficient model by now available in three sizes: 2B, 9B, and 27B."
mistral-nemo,https://ollama.ai//library/mistral-nemo,"A state-of-the-art 12B model with 128k context length, built by Mistral AI in collaboration with NVIDIA."
mistral-large,https://ollama.ai//library/mistral-large,"Mistral Large 2 is Mistral's new flagship model that is significantly more capable in code generation, mathematics, and reasoning with 128k context window and support for dozens of languages."
qwen2,https://ollama.ai//library/qwen2,"Qwen2 is a new series of large language models from Alibaba group"
deepseek-coder-v2,https://ollama.ai//library/deepseek-coder-v2,"An open-source Mixture-of-Experts code language model that achieves performance comparable to GPT4-Turbo in code-specific tasks."
p
@gistlyn
gistlyn / Configure.Mq.cs
Last active August 4, 2024 03:28
Use AWS SQS MQ
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using ServiceStack;
using ServiceStack.Messaging;
using ServiceStack.Aws;
using ServiceStack.Aws.Sqs;
[assembly: HostingStartup(typeof(MyApp.ConfigureMq))]
namespace MyApp;
@gistlyn
gistlyn / Configure.Mq.cs
Last active August 4, 2024 03:28
Use Azure Service Bus MQ
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using ServiceStack;
using ServiceStack.Messaging;
using ServiceStack.Azure;
using ServiceStack.Azure.Messaging;
[assembly: HostingStartup(typeof(MyApp.ConfigureMq))]
namespace MyApp;