Skip to content

Instantly share code, notes, and snippets.

name: Build Container
permissions:
packages: write
contents: write
on:
workflow_run:
workflows: ["Build"]
types:
- completed
workflow_dispatch:
@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="">
using ServiceStack;
[assembly: HostingStartup(typeof(MyApp.ConfigureRequestLogs))]
namespace MyApp;
public class ConfigureRequestLogs : 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.ApiKeys.cs
Last active June 16, 2024 02:52
apikeys-auth
using ServiceStack;
using ServiceStack.Auth;
using ServiceStack.Data;
using ServiceStack.OrmLite;
[assembly: HostingStartup(typeof(MyApp.ConfigureApiKeys))]
namespace MyApp;
public class ConfigureApiKeys : IHostingStartup
using MyApp.Data;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.OrmLite;
using ServiceStack.Configuration;
[assembly: HostingStartup(typeof(MyApp.ConfigureApiKeys))]
namespace MyApp;
using MyApp.Migrations;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.OrmLite;
[assembly: HostingStartup(typeof(MyApp.ConfigureDbMigrations))]
namespace MyApp;
// Code-First DB Migrations: https://docs.servicestack.net/ormlite/db-migrations
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using MyApp.Data;
using MyApp.Migrations;
using MyApp.ServiceModel;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.OrmLite;
[assembly: HostingStartup(typeof(MyApp.ConfigureDbMigrations))]