Code Snippets YAML

Short texts YAML 🧑‍💻 Code snippets YAML ✍️ Reading lists YAML 👀

GitHub Actions script for push nuget packages

name: release on: push: tags: – v[0-9]+.[0-9]+.[0-9]+** jobs: release: runs-on: ubuntu-latest env: DOTNET_NOLOGO: true steps: – uses: actions/[email protected] – uses: actions/[email protected] with: dotnet-version: ‘5.0.x’ – name: “Get version from git tag” run: echo “Version=${GITHUB_REF#refs/tags/v}” >> $GITHUB_ENV # Build – name: “dotnet restore” run: dotnet restore – name: “dotnet build” run: dotnet build -c Release -p:Version=$Version […]

Russian localization for Boss (Internal versioning number: 1)

# !———————————————————————————————–! # Welcome to the localization file. # !———————————————————————————————–! # # The localization/ folder stores various localization files. Use the suggested naming # convention message_LANGUAGE.yml and then the “SimpleLocalization” or the “Lang” class to # use this file. # # 1) COLOR CODES are supported with the ‘&’ character. # – For usage, see […]

Deployment Flask into Kubernetes

apiVersion: v1 kind: Service metadata: name: flask-test-service spec: selector: app: flask-test-app ports: – protocol: “TCP” port: 6000 targetPort: 5000 type: LoadBalancer — apiVersion: apps/v1 kind: Deployment metadata: name: flask-test-app spec: selector: matchLabels: app: flask-test-app replicas: 5 template: metadata: labels: app: flask-test-app spec: containers: – name: flask-test-app image: imagePullPolicy: IfNotPresent resources: limits: memory: “128Mi” cpu: […]

CloudFormation Template generated by sam pipeline bootstrap

AWSTemplateFormatVersion: ‘2010-09-09’ Transform: AWS::Serverless-2016-10-31 Parameters: PipelineUserArn: Type: String PipelineExecutionRoleArn: Type: String CloudFormationExecutionRoleArn: Type: String ArtifactsBucketArn: Type: String CreateImageRepository: Type: String Default: false AllowedValues: [true, false] ImageRepositoryArn: Type: String Conditions: MissingPipelineUser: !Equals [!Ref PipelineUserArn, “”] MissingPipelineExecutionRole: !Equals [!Ref PipelineExecutionRoleArn, “”] MissingCloudFormationExecutionRole: !Equals [!Ref CloudFormationExecutionRoleArn, “”] MissingArtifactsBucket: !Equals [!Ref ArtifactsBucketArn, “”] ShouldHaveImageRepository: !Or [!Equals [!Ref CreateImageRepository, “true”], […]

Dynamic prometheus alert rules based on team label

# List of kube_*_labels metrics – not all of these are useful for alerting. # kube_certificatesigningrequest_labels kube_certificatesigningrequest_labels * on (certificatesigningrequest) group_right(label_team) ( …insert expression here ) # kube_cronjob_labels kube_cronjob_labels * on (cronjob, namespace) group_right(label_team) ( …insert expression here ) # kube_daemonset_labels kube_daemonset_labels * on (daemonset, namespace) group_right(label_team) ( …insert expression here ) # kube_deployment_labels kube_deployment_labels […]