Snippets Collections
output.elasticsearch:
  hosts: ["http://localhost:9200"]
  pipeline: "%{[fields.log_type]}_pipeline"
name: example-workflow
  on: [push]
  jobs:
    production-deploy:
      if: github.repository == 'octo-org/octo-repo-prod'
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v3
        - uses: actions/setup-node@v3
          with:
            node-version: '14'
- run: npm install -g bats
cd $(vr_path)

branchName=$(System.PullRequest.SourceBranch)
SourceRepositoryURI=$(System.PullRequest.SourceRepositoryURI)

echo branchName is $branchName
echo SourceRepositoryURI is $SourceRepositoryURI

baseUrl="https://${branchName##*/}-bmc-org.pantheonsite.io/"
echo base url is $baseUrl

export PERCY_TOKEN=$(PERCY_TOKEN)
npx percy exec -- cypress run --config baseUrl=$baseUrl
    # Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

trigger:
- none

variables:
- name: src
  value: $(System.DefaultWorkingDirectory)/tests/visual_regression_tests
- name: branchName
  value: $(Build.SourceBranchName)
  
pool:
  vmImage: ubuntu-latest

steps:
- task: NodeTool@0
  inputs:
    versionSpec: '14.x'
  displayName: 'Install Node.js'

- task: Bash@3
  inputs:
    targetType: 'inline'
    script: 'brew install pantheon-systems/external/terminus'

- script: |
    terminus auth:login --machine-token=$(TERMINUS_TOKEN)
  displayName: 'Terminus Authentication'
  workingDirectory: $(src)

- script: |
    PANTHEON_MULTIDEV_LIST="$(terminus multidev:list -n bmc-org --format=list --field=Name)"
    echo PANTHEON_MULTIDEV_LIST
  displayName: 'Terminus check available multidevs'
  workingDirectory: $(src)

- task: Bash@3
  inputs:
    targetType: 'inline'
    script: |
      #!/bin/bash
      
      # Exit on error
      set -e

      # Stash list of all Pantheon sites in the org
      PANTHEON_SITES="$(terminus multidev:list -n bmc-org --format=list --field=Name)"
        FOUND="false"
        
      # Loop through each site in the list
      while read -r PANTHEON_SITES
      do
      # if the branch is found then let user know that this branch exists and exit the script.
        if [ $PANTHEON_SITES == $(branchName) ];
        then
            echo "Multidev was found!"
            FOUND="true"
            echo "Existing multidev URL: https://$(branchName)-bmc-org.pantheonsite.io/"
            break
        fi

      done <<< "$PANTHEON_SITES"

      #if the branch was not found then create a branch with the desired name
      if [ $FOUND == "false" ];
      then
        terminus multidev:create bmc-org.live $(branchName)
        echo "New multidev URL: https://$(branchName)-bmc-org.pantheonsite.io/"
      fi

- script: |
    npm install
    export PERCY_TOKEN=$(PERCY_TOKEN)
    export PERCY_TARGET_BRANCH=$(PERCY_TARGET_BRANCH)
    npx percy exec -- cypress run --config baseUrl="https://$(branchName)-bmc-org.pantheonsite.io/"
  displayName: 'NPM Install and Percy Setup and Execute'
  workingDirectory: $(src)
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

trigger:
- none

pool:
  vmImage: ubuntu-latest

variables:
- name: branchName
  value: $(Build.SourceBranchName)

steps:
- task: NodeTool@0
  inputs:
    versionSpec: '14.x'
  displayName: 'Install Node.js'

- task: Bash@3
  inputs:
    targetType: 'inline'
    script: 'brew install pantheon-systems/external/terminus'

- script: |
    terminus auth:login --machine-token=$(TERMINUS_TOKEN)
  displayName: 'Terminus Authentication'

- task: Bash@3
  inputs:
    targetType: 'inline'
    script: |
      #!/bin/bash
      
      # Exit on error
      set -e
      MULTIDEV_EXISTS="false"
      
      # Stash list of all Pantheon sites in the org
      PANTHEON_SITES="$(terminus multidev:list -n bmc-org --format=list --field=Name)"
        
      # Loop through each site in the list
      while read -r PANTHEON_SITES
      do
      # if the branch is found then let user know that this branch exists and exit the script.
        if [ $PANTHEON_SITES == $(branchName) ];
        then
            MULTIDEV_EXISTS="true"
            echo "Existing multidev URL: https://$(branchName)-bmc-org.pantheonsite.io/"
            break
        fi
      
      done <<< "$PANTHEON_SITES"
      
      if [ $MULTIDEV_EXISTS == "true" ];
      then
        echo "Multidev was found!"
        "$(terminus env:clone-content --verbose bmc-org.live abc)"
      else 
        echo "Error:  multidev environment named "$(branchName)" was not found."
        exit 1
      fi
    failOnStderr: true
  continueOnError: false

- task: Bash@3
  inputs:
    targetType: 'inline'
    script: |
      #!/bin/bash
      
      PANTHEON_PIPELINE_CLONE="$(terminus env:clone-content --verbose healthcity.live pipelines)"
      echo $(PANTHEON_PIPELINE_CLONE)
  continueOnError: false
  displayName: 'Updating Multidev Environments'
export KUBECONFIG=~/.kube/config:~/someotherconfig 
kubectl config view --flatten
dependencies:
  flutter:
    sdk: flutter

  carousel_pro:
    git:
      url: git://github.com/jlouage/flutter-carousel-pro.git
      ref: main # branch name
dbt run --models snowplow_web tag:snowplow_web_incremental --full-refresh --vars 'snowplow__allow_refresh: true'
pre_build:
  commands:
    - export LC_ALL="en_US.UTF-8"
    - locale-gen en_US en_US.UTF-8
    - dpkg-reconfigure locales
name: Generate CHANGELOG.md
on:
  repository_dispatch:
  workflow_dispatch:
  push:
    branches:
      - main
      - master
jobs:
  changelog:
    name: Generate changelog
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Generate a changelog
        uses: orhun/git-cliff-action@v1
        id: git-cliff
        with:
          config: ./cliff.toml
          args: --verbose
        env:
          OUTPUT: ./CHANGELOG.md

      - name: Print the changelog
        run: cat "${{ steps.git-cliff.outputs.changelog }}"

      - name: Commit and Push Changes
        uses: actions-js/push@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
gh_labels:
  bug:
    description: Bugfixes in codebase when something is not working.
    colour: 'd73a4a'
  feature:
    description: New enhancements and features.
    colour: '1B6659'
  documentation:
    description: Improvements or additions to docs.
    colour: '0075ca'
  release:
    description: Indicates a new release.
    colour: '108a51'
  config:
    description: Configuration and meta-infrastructural changes.
    colour: '8ed92e'
  refactor:
    description: Code refactoring.
    colour: 'D0EFCD'
  question:
    description: Further information requested.
    colour: 'd876e3'
  data:
    description: Issues pertaining to data or data preparations.
    colour: 'FAA631'
  tests:
    description: Issues related to tests.
    colour: 'e4e669'
# Start minikube
minikube start

# Set docker env
eval $(minikube docker-env)             # unix shells
minikube docker-env | Invoke-Expression # PowerShell

# Build image
docker build -t foo:0.0.1 .

# Run in minikube
kubectl run hello-foo --image=foo:0.0.1 --image-pull-policy=Never

# Check that it's running
kubectl get pods
version: '3.4'
services:
  weaviate:
    image: semitechnologies/weaviate:1.2.1
    ports:
    - 8080:8080
    restart: on-failure:0
    environment:
      CONTEXTIONARY_URL: contextionary:9999
      QUERY_DEFAULTS_LIMIT: 25
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      DEFAULT_VECTORIZER_MODULE: 'text2vec-contextionary'
  contextionary:
    environment:
      OCCURRENCE_WEIGHT_LINEAR_FACTOR: 0.75
      EXTENSIONS_STORAGE_MODE: weaviate
      EXTENSIONS_STORAGE_ORIGIN: http://weaviate:8080
      NEIGHBOR_OCCURRENCE_IGNORE_PERCENTILE: 5
      ENABLE_COMPOUND_SPLITTING: 'false'
    image: semitechnologies/contextionary:en0.16.0-v1.0.2
star

Mon Oct 03 2022 08:48:08 GMT+0000 (UTC) https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html

#yaml
star

Tue Sep 20 2022 20:56:22 GMT+0000 (UTC) https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution

#yaml
star

Tue Aug 30 2022 19:19:06 GMT+0000 (UTC)

#yaml #terminus
star

Mon Aug 15 2022 19:25:16 GMT+0000 (UTC)

#yaml #terminus
star

Sat Jun 11 2022 18:26:21 GMT+0000 (UTC) https://stackoverflow.com/questions/46184125/how-to-merge-kubectl-config-file-with-kube-config

#yaml
star

Tue May 31 2022 12:26:55 GMT+0000 (UTC) https://stackoverflow.com/questions/54022704/how-to-add-a-package-from-github-in-flutter

#yaml
star

Wed May 25 2022 23:44:10 GMT+0000 (UTC)

#yaml
star

Thu Apr 28 2022 14:35:57 GMT+0000 (UTC) https://austincloud.guru/2018/03/13/codebuild-and-utf-8/

#yaml
star

Tue Aug 03 2021 09:53:41 GMT+0000 (UTC) https://stackoverflow.com/questions/42564058/how-to-use-local-docker-images-with-minikube

#yaml
star

Sat May 15 2021 01:10:59 GMT+0000 (UTC) https://www.semi.technology/developers/weaviate/current/getting-started/installation.html#introduction

#yaml

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension