Skip to content

Instantly share code, notes, and snippets.

@gistlyn gistlyn/mix.md
Last active Feb 4, 2020

Embed
What would you like to do?
Mix Gists

Available Gists

Projects

  • init {to:'.'} project Empty .NET Core 2.2 ServiceStack App
  • init-lts {to:'.'} project Empty .NET Core 2.1 LTS ServiceStack App
  • init-corefx {to:'.'} project Empty ASP.NET Core 2.1 LTS on .NET Framework
  • init-sharp-app {to:'.'} project Empty ServiceStack Sharp App

UI Starter Templates

  • bootstrap-sharp {to:'$HOST'} ui,sharp 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
  • marten {to:'$HOST'} db Use Marten NoSQL with PostgreSQL

Auth

  • auth {to:'$HOST'} auth Configure AuthFeature
  • 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

  • grpc {to:'$HOST'} feature,grpc Configure gRPC (requires .NET Core 3.1)
  • grpc-android {to:'.'} java,grpc Android gRPC SSL Channel Builder
  • 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'} feature,hangfire,postgres Adds hangfire cron scheduler and dashboard for PostgreSQL

Assets

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

Libraries

  • vue-lite-lib {to:'$HOST'} lib,vue Update vue-lite projects libraries
  • react-lite-lib {to:'$HOST'} lib,react Update react-lite projects libraries

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
  • supervisor {to:'/etc/supervisor/conf.d/'} config Supervisor config for managed execution of .NET Core Apps
  • 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 config files based on default nlog config. Saves to env APP_LOG_PATH

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
@GuerrillaCoder

This comment has been minimized.

Copy link

GuerrillaCoder commented Dec 30, 2019

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

@gistlyn

This comment has been minimized.

Copy link
Owner Author

gistlyn commented Dec 30, 2019

@GuerrillaCoder Added hangfire-postgres, thx!

@GuerrillaCoder

This comment has been minimized.

Copy link

GuerrillaCoder commented Dec 30, 2019

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

This comment has been minimized.

Copy link
Owner 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
You can’t perform that action at this time.