Snippets Collections
debezium:
    image: docker.io/debezium/server:latest
    volumes:
      - ./debezium/conf:/debezium/conf
    depends_on:
      - postgres
      - nats
# Example configuration.yaml entry
websocket_api:
name: Custom document properties

description: Adds and reads custom document properties of different types.

host: WORD

api_set: {}

script:

  content: |

    $("#number").click(() => tryCatch(insertNumericProperty));

    $("#string").click(() => tryCatch(insertStringProperty));

    $("#read").click(() => tryCatch(readCustomDocumentProperties));

​

    async function insertNumericProperty() {

      await Word.run(async (context) => {

        context.document.properties.customProperties.add("Numeric Property", 14);

​

        await context.sync();

        console.log("Property added");

      });

    }

​

    async function insertStringProperty() {

      await Word.run(async (context) => {

        context.document.properties.customProperties.add("String Property", "Hello World!");
23
​

        await context.sync();

        console.log("Property added");

      });

    }

​

    async function readCustomDocumentProperties() {

      await Word.run(async (context) => {

        const properties = context.document.properties.customProperties;

        properties.load("key,type,value");

​

        await context.sync();

        for (let i = 0; i < properties.items.length; i++)

          console.log(

            "Property Name:" +

              properties.items[i].key +

              "; Type=" +

              properties.items[i].type +

              "; Property Value=" +

              properties.items[i].value

          );

      });

    }

​

    /** Default helper for invoking an action and handling errors. */

    async function tryCatch(callback) {

      try {

        await callback();

      } catch (error) {

        // Note: In a production add-in, you'd want to notify the user through your add-in's UI.

        console.error(error);
import { context } from '@actions/github';

const author = context.payload.commits[0].author; // Be careful using this, it may not always be here. For example, in the case of a pull_request triggered action, this will result in an error.
await exec(`git config --local user.name "${author.name}"`);
await exec(`git config --local user.email "${author.email}"`);
import { context } from '@actions/github';

await exec(`git config --local user.name "${context.actor}"`);
await exec(`git config --local user.email "github-action-${context.actor}@users.noreply.github.com"`); // This is basically a bogus email, but you get the idea
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

Tue Nov 21 2023 09:10:36 GMT+0000 (Coordinated Universal Time)

#yaml
star

Sun Apr 16 2023 18:56:23 GMT+0000 (Coordinated Universal Time) https://www.home-assistant.io/integrations/websocket_api/#configuration

#yaml
star

Thu Mar 02 2023 23:00:46 GMT+0000 (Coordinated Universal Time) https://gist.github.com/evansjeffm99/54b71165d2e20d41dc4b54bd7f723943/edit

#word #properties #customlabels #yaml
star

Tue Jan 31 2023 01:09:18 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/61432453/git-config-global-user-email-emailexample-com-and-user-name-error-in-gith?answertab

#yaml
star

Tue Jan 31 2023 01:09:15 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/61432453/git-config-global-user-email-emailexample-com-and-user-name-error-in-gith?answertab

#yaml
star

Mon Jan 23 2023 21:26:26 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/47128586/how-to-delete-all-resources-from-kubernetes-one-time

#yaml
star

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

#yaml
star

Tue Sep 20 2022 20:56:22 GMT+0000 (Coordinated Universal Time) 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 (Coordinated Universal Time)

#yaml #terminus
star

Mon Aug 15 2022 19:26:33 GMT+0000 (Coordinated Universal Time)

#yaml #terminus
star

Mon Aug 15 2022 19:25:16 GMT+0000 (Coordinated Universal Time)

#yaml #terminus
star

Sat Jun 11 2022 18:26:21 GMT+0000 (Coordinated Universal Time) 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 (Coordinated Universal Time) 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 (Coordinated Universal Time)

#yaml
star

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

#yaml
star

Wed Feb 02 2022 22:04:01 GMT+0000 (Coordinated Universal Time)

#docs #config #yaml #github
star

Wed Feb 02 2022 22:03:00 GMT+0000 (Coordinated Universal Time)

#docs #config #yaml #github
star

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

#yaml
star

Sat May 15 2021 01:10:59 GMT+0000 (Coordinated Universal Time) 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