Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Last active November 7, 2024 03:10
Show Gist options
  • Save gistlyn/9b32b03f207a191099137429051ebde8 to your computer and use it in GitHub Desktop.
Save gistlyn/9b32b03f207a191099137429051ebde8 to your computer and use it in GitHub Desktop.
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
  • init-lts {to:'.'} project,C# Empty .NET 8 LTS ServiceStack App
  • init-vb {to:'.'} project,VB VB.NET Empty .NET 8 ServiceStack App
  • init-fsharp {to:'.'} project,F# F# Empty .NET 8 ServiceStack App
  • init-corefx {to:'.'} project,C# Empty ASP.NET Core 2.1 LTS on .NET Framework
  • init-sharp-app {to:'.'} project,S# Empty ServiceStack Sharp App
  • init-test {to:'.'} project,C# .NET 8 Integration Test
  • init-test2 {to:'.'} project,C# .NET 8 and .NET v4.72 Integration Test

OrmLite and Entity Framework

  • ef-sqlserver {to:'$HOST'} db Use OrmLite + EF with SQL Server
  • ef-sqlite {to:'$HOST'} db Use OrmLite + EF with SQLite
  • ef-postgres {to:'$HOST'} db Use OrmLite + EF with PostgreSQL
  • ef-mysql {to:'$HOST'} db Use OrmLite + EF with MySql

Data

  • redis {to:'$HOST'} db Use ServiceStack.Redis
  • sqlserver {to:'$HOST'} db Use OrmLite with SQL Server
  • sqlite {to:'$HOST'} db Use OrmLite with SQLite
  • postgres {to:'$HOST'} db Use OrmLite with PostgreSQL
  • mysql {to:'$HOST'} db Use OrmLite with MySql
  • oracle {to:'$HOST'} db Use OrmLite with Oracle
  • firebird {to:'$HOST'} db Use OrmLite with Firebird
  • dynamodb {to:'$HOST'} db Use AWS DynamoDB and PocoDynamo
  • mongodb {to:'$HOST'} db Use MongoDB
  • ravendb {to:'$HOST'} db Use RavenDB
  • marten {to:'$HOST'} db Use Marten

Auth

  • auth {to:'$HOST'} auth Configure AuthFeature
  • auth-ext {to:'$HOST'} auth Configure AuthFeature inc. extended .NET Providers
  • auth-db {to:'$HOST'} auth Use OrmLite Auth Repository (requires auth)
  • auth-redis {to:'$HOST'} auth Use Redis Auth Repository (requires auth)
  • auth-memory {to:'$HOST'} auth Use Memory Auth Repository (requires auth)
  • auth-dynamodb {to:'$HOST'} auth Use DynamoDB Auth Repository (requires auth)
  • auth-mongodb {to:'$HOST'} auth Use MongoDB Auth Repository (requires auth)
  • auth-ravendb {to:'$HOST'} auth Use RavenDB Auth Repository (requires auth)
  • auth-marten {to:'$HOST'} auth Use Marten Auth Repository (requires auth)
  • apikeys {to:'$HOST'} auth Configure API Keys in Identity Auth project
  • apikeys-auth {to:'$HOST'} auth Configure API Keys in project without Auth

Messaging (MQ)

  • backgroundmq {to:'$HOST'} mq Use Memory Background MQ
  • rabbitmq {to:'$HOST'} mq Use RabbitMQ
  • sqs {to:'$HOST'} mq Use AWS SQS MQ
  • servicebus {to:'$HOST'} mq Use Azure Service Bus MQ
  • redismq {to:'$HOST'} mq Use Redis MQ

Features

  • autoquery {to:'$HOST'} autoquery Configure AutoQuery Services
  • autocrudgen {to:'$HOST'} autoquery,autogen,db AutoGen AutoQuery Services for Existing DBs
  • jobs {to:'$HOST'} jobs Configure Background Jobs
  • sqlitelogs {to:'$HOST'} logs Configure SQLite Request Logs
  • requestlogs {to:'$HOST'} feature Configure Memory Request Logging
  • autodto {to:'.'} autoquery,codegen Generate DB DTOs in C#, TypeScript, Dart, Java, Kotlin, Swift, VB.NET, F#
  • migrations {to:'$HOST'} db Add OrmLite DB Migrations to an existing project
  • validation-source {to:'$HOST'} validation Configure dynamic RDBMS validations source
  • profiling {to:'$HOST'} feature Configure Request Logging & Profiling
  • serverevents {to:'$HOST'} feature,sse Configure Server Events (SSE)
  • cors {to:'$HOST'} feature,cors Configure support for CORS
  • openapi {to:'$HOST'} feature,openapi Configure support for Open API and Swagger UI
  • openapi3 {to:'$HOST'} feature,openapi Configure Endpoint Routing Open API v3 and Swagger UI
  • feature-mq {to:'$HOST'} feature,mq,sharp Simple MQ Feature to test sending Messages
  • feature-authrepo {to:'$HOST'} feature,auth,sharp List and Search Users registered in Auth Repository
  • hangfire-postgres {to:'$HOST'} hangfire,postgres Adds hangfire cron scheduler and dashboard for PostgreSQL
  • sharpdata {to:'.'} S# Instant JSON,CSV,XML,JSV data APIs around configured RDBMS tables
  • flutter {to:'.'} flutter,mobile Add flutter project
  • flutter-grpc {to:'.'} flutter,mobile Add flutter project with GRPC

GitHub Actions

  • build {to:'.'} github Adds GitHub Action to build and test
  • release-ecr-aws {to:'.'} github Adds GitHub Action to deploy to AWS ECS
  • release-ghr-vanilla {to:'.'} github Adds GitHub Action to deploy to a Linux server using SSH, via GHCR
  • release-ecr-vanilla {to:'.'} github Adds GitHub Action to deploy to a Linux server using SSH, via AWS ECR
  • release-hub-vanilla {to:'.'} github Adds GitHub Action to deploy to a Linux server using SSH, via DockerHub
  • blazor-litestream-aws {to:'.'} github Use SQLite and Litestream replicating to AWS S3 for Blazor templates
  • blazor-litestream-azure {to:'.'} github Use SQLite and Litestream replicating to Azure Blob Storage for Blazor templates
  • blazor-litestream-sftp {to:'.'} github Use SQLite and Litestream replicating to SFTP server for Blazor templates
  • jamstack-litestream-aws {to:'.'} github Use SQLite and Litestream replicating to AWS S3 for JamStack templates
  • jamstack-litestream-azure {to:'.'} github Use SQLite and Litestream replicating to Azure Blob for JamStack templates
  • jamstack-litestream-sftp {to:'.'} github Use SQLite and Litestream replicating to SFTP server for JamStack templates
  • litestream-aws {to:'.'} github Use SQLite and Litestream replicating to AWS S3
  • litestream-azure {to:'.'} github Use SQLite and Litestream replicating to Azure Blob Storage
  • litestream-sftp {to:'.'} github Use SQLite and Litestream replicating to an SFTP server
  • kamal {to:'.'} github Use Kamal to deploy your apps with GitHub Actions

Upgrades

Assets

  • nuglify {to:'$HOST'} assets Use Nuglify's Advanced JS/CSS/HTML Minifiers

SQLite databases

Sharp Data

gRPC

  • grpc {to:'$HOST'} feature,grpc Configure gRPC
  • grpc-android {to:'.'} java,grpc Android gRPC SSL Channel Builder
  • bcl.proto {to:'.'} grpc protobuf-net\bcl.proto

Examples

  • example-validation {to:'$HOST'} example,sharp Contacts Validation Example
  • todoworld-cs {to:'.'} example,grpc C# gRPC insecure Generic ServiceClient TodoWorld Example
  • todoworld-cs-ssl {to:'.'} example,grpc C# gRPC SSL Generic ServiceClient TodoWorld Example
  • todoworld-fs {to:'.'} example,grpc F# gRPC insecure Generic ServiceClient TodoWorld Example
  • todoworld-fs-ssl {to:'.'} example,grpc F# gRPC SSL Generic ServiceClient TodoWorld Example
  • todoworld-vb {to:'.'} example,grpc VB.NET gRPC insecure Generic ServiceClient TodoWorld Example
  • todoworld-vb-ssl {to:'.'} example,grpc VB.NET gRPC SSL Generic ServiceClient TodoWorld Example
  • todoworld-csharp {to:'.'} example,grpc C# Google protoc insecure GrpcServicesClient TodoWorld Example
  • todoworld-csharp-ssl {to:'.'} example,grpc C# Google protoc SSL GrpcServicesClient TodoWorld Example
  • todoworld-csharp-smart {to:'.'} example,grpc C# Google protoc ServiceStack GrpcServicesClient TodoWorld Example
  • todoworld-swift {to:'.'} example,grpc Swift Google protoc insecure GrpcServicesClient TodoWorld Example
  • todoworld-swift-ssl {to:'.'} example,grpc Swift Google protoc SSL GrpcServicesClient TodoWorld Example
  • todoworld-java {to:'.'} example,grpc Java Google protoc insecure gRPC Service Client TodoWorld Example
  • todoworld-java-ssl {to:'.'} example,grpc Java Google protoc SSL gRPC Service Client TodoWorld Example
  • todoworld-dart {to:'.'} example,grpc Dart Google protoc insecure GrpcServicesClient TodoWorld Example
  • todoworld-dart-ssl {to:'.'} example,grpc Dart Google protoc SSL GrpcServicesClient TodoWorld Example
  • todoworld-go {to:'.'} example,grpc Go Google protoc insecure GrpcServicesClient TodoWorld Example
  • todoworld-go-ssl {to:'.'} example,grpc Go Google protoc SSL GrpcServicesClient TodoWorld Example
  • todoworld-python {to:'.'} example,grpc Python Google protoc insecure GrpcServicesStub TodoWorld Example
  • todoworld-python-ssl {to:'.'} example,grpc Python Google protoc SSL GrpcServicesStub TodoWorld Example
  • todoworld-ruby {to:'.'} example,grpc Ruby Google protoc insecure GrpcServicesStub TodoWorld Example
  • todoworld-ruby-ssl {to:'.'} example,grpc Ruby Google protoc SSL GrpcServicesStub TodoWorld Example
  • todoworld-php {to:'.'} example,grpc PHP Google protoc insecure GrpcServicesClient TodoWorld Example
  • todoworld-php-ssl {to:'.'} example,grpc PHP Google protoc SSL GrpcServicesClient TodoWorld Example
  • todoworld-node {to:'.'} example,grpc Node.js Google protoc insecure GrpcServicesClient TodoWorld Example
  • todoworld-node-ssl {to:'.'} example,grpc Node.js Google protoc SSL GrpcServicesClient TodoWorld Example

Config

  • feedz {to:'.'} config ServiceStack pre-release Feedz packages
  • gh-nuget {to:'.'} config ServiceStack pre-release GitHub packages
  • myget {to:'.'} config ServiceStack pre-release MyGet packages
  • nginx {to:'/etc/nginx/sites-available/'} config Nginx reverse proxy config for .NET Core Apps
  • nginx-yum {to:'/etc/nginx/conf.d/'} config Nginx reverse proxy (yum) config for .NET Core Apps
  • supervisor {to:'/etc/supervisor/conf.d/'} config Supervisor config for managed execution of .NET Core Apps
  • supervisord.service {to:'/usr/lib/systemd/system/'} config Systemd supervisord.service script
  • supervisor-sharp {to:'/etc/supervisor/conf.d/'} config Supervisor config for managed execution of Sharp Apps
  • docker {to:'.'} config Dockerfile example for .NET Core Sharp Apps
  • nlog {to:'$HOST'} config Adds prod/dev default config files. Saves to APP_LOG_PATH
  • gen-dev-crt.sh {to:'$HOST'} config Generate *.servicestack.com self-signed localhost certificate
  • typechat.mjs {to:'$HOST'} config Node typechat.mjs script

Files

Docker

  • docker-dotnet {to:'.'} docker Docker file to build basic ServiceStack application
  • docker-dotnet-spa {to:'.'} docker Docker file to build ServiceStack application that also needs node
  • docker-jupyter {to:'.'} docker Jupyter Dockerfile for running C# and F# Notebooks on mybinder.org
  • docker-jupyter-reports {to:'.'} docker Jupyter Dockerfile for running C#,F# and LaTeX support for nbconvert

Including your Gists

To include your gist in this directory and make it available to all web tool users please post a link to your gist with your preferred alias in the comments below. Your chosen alias and gist description will be shown in the web + output listing.

Mix Gists

Usage mix ?

View all published gists:
   mix

Simple Usage:
   mix <name> <name> ...

Mix using numbered list index instead:
   mix 1 3 5 ...

Delete previously mixed gists:
   mix -delete <name> <name> ...

Use custom project name instead of current folder name (replaces MyApp):
   mix -name ProjectName <name> <name> ...

Replace additional tokens before mixing:
   mix -replace term=with <name> <name> ...

Multi replace with escaped string example:
   mix -replace term=with -replace "This Phrase"="With This" <name> <name> ...

Only display available gists with a specific tag:
  mix #<tag>
  mix #<tag>,<tag>,<tag>

Available Modifers

The modifiers next to each gist specify where the gist files should be written to:

  • {to:'.'} - Write to current directory (default)
  • {to:'$HOST'} - Write to host project (1st folder containing either appsettings.json,Web.config,App.config,Startup.cs)
  • {to:'wwwroot/'} - Write to first sub directories named wwwroot
  • {to:'package.json'} - Write to first directory containing package.json
  • {to:'/etc/nginx/sites-available/'} - Write to absolute folder
  • {to:'$HOME/.my-app/'} - Write to $HOME in unix or %USERPROFILE% on windows
  • {to:'${EnumName}/.my-app/'} - Write to Environment.SpecialFolder.{EnumName}, e.g:
  • {to:'$UserProfile/.my-app/'} - Write to Environment.SpecialFolder.UserProfile

File Name features

Use \ to in gist file names to write files to sub directories, e.g:

  • wwwroot\js\script.js - Writes gist file to wwwroot/js/script.js

Use ? at end of filename to indicate optional file that should not be overridden, e.g:

  • wwwroot\login.html? - Only writes to wwwroot\login.html if it doesn't already exist.

Replacement rules

Any gist file name or contents with different "MyApp" text styles will be replaced with the Project Name in that style, e.g:

  • MyApp will be replaced with ProjectName
  • my-app will be replaced with project-name
  • My App will be replaced with Project Name

Adding packages

To include nuget package dependencies, create a file in your gist called _init with the list of dotnet or nuget commands:

dotnet add package ServiceStack.OrmLite.Sqlite
@GuerrillaCoder
Copy link

alias: hangfire-postgres
description: adds hangfire cron scheduler and dashboard
url: https://gist.github.com/GuerrillaCoder/28ae3d10f3063bf693da1d566dbb6000

@gistlyn
Copy link
Author

gistlyn commented Dec 30, 2019

@GuerrillaCoder Added hangfire-postgres, thx!

@GuerrillaCoder
Copy link

alias: nlog-config
description: adds prod and dev config files based on default config from nlog. Saves to env var APP_LOG_PATH.
url: https://gist.github.com/GuerrillaCoder/5e42aea8a1462dacbe8640328ae4c162

ps. Would be nice to have it enable it as well but it requires modifying program.cs so I think it's not possible

@gistlyn
Copy link
Author

gistlyn commented Dec 31, 2019

@GuerrillaCoder done, thx! but used nlog alias to match other configs where config suffix is unnecessary in alias, specified on tag instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment