This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import datetime as dt | |
| import decimal | |
| import typing | |
| from apistar import types | |
| from apistar.http import JSONResponse, Response | |
| from apistar.server.components import Component | |
| from sqlalchemy.engine import Engine | |
| from sqlalchemy.orm import sessionmaker, Session, scoped_session | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "database/sql" | |
| "encoding/json" | |
| "fmt" | |
| "reflect" | |
| "time" | |
| "github.com/go-sql-driver/mysql" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Convert-ToPackageReference | |
| { | |
| Param ( [Parameter( Mandatory, ValueFromPipeline )][String] $inputUri, | |
| [String] $stylesheetUri = "https://gist.githubusercontent.com/a4099181/074a6c3dd524ea0d343382137492399c/raw/cdd0fb31efd70c4c0f8c86ddb314de86ab8972e8/Convert-ToPackageReference.xsl", | |
| [String] $resultsFile = [System.IO.Path]::GetTempFileName() ) | |
| Process { | |
| $xslt = New-Object System.Xml.Xsl.XslCompiledTransform | |
| $xslt.Load( $stylesheetUri ) | |
| $xslt.Transform( $inputUri, $resultsFile ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // App | |
| import { Component } from '@angular/core'; | |
| @Component({ | |
| selector: 'app', | |
| template: '<span>{{ sayHello() }}</span>', | |
| }) | |
| export class App { | |
| public name: string = 'John'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Global variables | |
| re='^[0-9]+$' | |
| jira_name="MINT" | |
| # Will create a new branch with name ($1) from master | |
| # it will also make sure master is up to date from origin | |
| workstartFunc() { | |
| if ! [[ $1 =~ $re ]] | |
| then | |
| val=$1 |
Usage:
To create a new branch that is up-to-date with the remote master:
$ ws 123
Creates the branch issue123
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| open Fake.OpenCoverHelper | |
| let buildDir = "./build/" | |
| let coverageDir = buildDir + "coverage/" | |
| let testsDir = buildDir + "tests/" | |
| Target "RunNUnitTests" (fun _ -> | |
| let assembliesToTest = (" ", (!! (buildDir + "/*.Tests.dll"))) |> System.String.Join | |
| CreateDir coverageDir | |
| CreateDir testsDir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| type Something struct {} | |
| func (s Something) Test() bool { | |
| return false | |
| } | |
| type SomethingInterface interface { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "github.com/codegangsta/negroni" | |
| "github.com/gorilla/mux" | |
| "log" | |
| "net/http" | |
| ) |
NewerOlder