Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Created November 9, 2021 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gistlyn/7362ea802aef361bbdc21097b6a99e0d to your computer and use it in GitHub Desktop.
Save gistlyn/7362ea802aef361bbdc21097b6a99e0d to your computer and use it in GitHub Desktop.
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
  • init-lts {to:'.'} project,C# Empty .NET Core 3.1 LTS ServiceStack App
  • init-vb {to:'.'} project,VB VB.NET Empty .NET 5 ServiceStack App
  • init-fsharp {to:'.'} project,F# F# Empty .NET 5 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 5 and .NET v4.72 Integration Test

UI Starter Templates

  • bootstrap-sharp {to:'$HOST'} ui,S# Bootstrap + Sharp Pages Starter Template

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

Auth

  • auth {to:'$HOST'} auth Configure AuthFeature
  • auth-ext {to:'$HOST'} auth Configure AuthFeature inc. .NET Core 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)

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
  • autodto {to:'.'} autoquery,codegen Generate DB DTOs in C#, TypeScript, Dart, Java, Kotlin, Swift, VB.NET, F#
  • validation {to:'$HOST'} feature,validation Configure Validation Support
  • validation-source {to:'$HOST'} validation Configure dynamic validations sourced from registered DbConnectionFactory
  • serverevents {to:'$HOST'} feature,sse Configure Server Events (SSE)
  • cors {to:'$HOST'} feature,cors Configure support for CORS
  • openapi {to:'$HOST'} feature,postman Configure support for Open API and Swagger UI
  • postman2 {to:'$HOST'} feature,postman Configure support for Postman2
  • 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

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

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 (requires .NET Core 3.1)
  • 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

  • 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

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

SVG

  • svg-action {to:'svg/'} svg Material Design Action Icons
  • svg-alert {to:'svg/'} svg Material Design Alert Icons
  • svg-av {to:'svg/'} svg Material Design Audio Visual Icons
  • svg-communication {to:'svg/'} svg Material Design Communication Icons
  • svg-content {to:'svg/'} svg Material Design Content Icons
  • svg-device {to:'svg/'} svg Material Design Device Icons
  • svg-editor {to:'svg/'} svg Material Design Editor Icons
  • svg-file {to:'svg/'} svg Material Design File Icons
  • svg-hardware {to:'svg/'} svg Material Design Hardware Icons
  • svg-image {to:'svg/'} svg Material Design Image Icons
  • svg-maps {to:'svg/'} svg Material Design Maps Icons
  • svg-navigation {to:'svg/'} svg Material Design Navigation Icons
  • svg-places {to:'svg/'} svg Material Design Places Icons
  • svg-social {to:'svg/'} svg Material Design Social Icons
  • svg-toggle {to:'svg/'} svg Material Design Toggle Icons

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment